Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IndieAuth.com fallback #14

Closed
simonw opened this issue Nov 17, 2020 · 3 comments
Closed

Remove IndieAuth.com fallback #14

simonw opened this issue Nov 17, 2020 · 3 comments

Comments

@simonw
Copy link
Owner

simonw commented Nov 17, 2020

These TODOs:

if not authorization_endpoint:
# Redirect to IndieAuth.com as a fallback
# TODO: Only do this if rel=me detected
# TODO: make this a configurable preference
indieauth_url = "https://indieauth.com/auth?" + urllib.parse.urlencode(
{
"me": me,
"client_id": urls.client_id,
"redirect_uri": urls.indie_auth_com_redirect_uri,
}
)
return Response.redirect(indieauth_url)

@simonw simonw changed the title Smarter IndieAuth.com redirecting Remove IndieAuth.com fallback Nov 18, 2020
@simonw
Copy link
Owner Author

simonw commented Nov 18, 2020

I'm going to remove the indieauth.com mechanism entirely. It's based on an undocumented feature of indieauth.com which isn't likely to last, and users can still take advantage of RelMeAuth by adding the following to their website:

<link href="https://github.com/simonw" rel="me">
<link rel="authorization_endpoint" href="https://indieauth.com/auth">

@simonw
Copy link
Owner Author

simonw commented Nov 18, 2020

Full context: the first version of this plugin didn't implement the IndieAuth specification at all - it instead worked using an undocumented feature of IndieAuth.com which allows you to kick off authentication (that scans for RelMeAuth tags) using a form that looked like this:

<form action="https://indieauth.com/auth" method="get">
<p><input type="text" name="me">
<input type="hidden" name="client_id" value="{{ client_id }}">
<input type="hidden" name="redirect_uri" value="{{ redirect_uri }}">
<input type="submit" value="Login">
</p>
</form>

I'm currently just using this as a fallback for if no authorization_endpoint is found on the page - but this fallback will stop working when IndieAuth eventually retires.

The only benefit from the fallback is that it allows authentication for pages that use RelMeAuth without including a <link rel="authorization_endpoint"> tag. I'm OK losing that in exchange for simplifying this plugin and protecting against IndieAuth going offline in the future.

@simonw
Copy link
Owner Author

simonw commented Nov 18, 2020

Need to update the README too.

@simonw simonw closed this as completed in bddccb8 Nov 18, 2020
simonw added a commit that referenced this issue Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant