You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This calls _discoverEndpoint which calls _fetchHead and _fetchBody
The p3k/http calls in _fetchBody and _fetchHead correctly follow the redirects and include the final URL in the url property.
The final URL is not returned to _discoverEndpoint, though. When it calls_extractEndpointFromHTML, it's using the original http URL to resolve the endpoint URL.
The result from discoverMetadataEndpoint is then http://gregorlove.com/indieauth-metadata-endpoint/ instead of https. This causes issuer validation to fail.
Potential fix
Add a new session value to store the final URL that p3k/http responds with and use that when resolving URLs after the fetch. This might require some additional security checks, e.g. "is the final URL still the same hostname that was entered?" Maybe not, though, since it already has validations for the authz endpoint, issuer, and token endpoint when completing.
Activity