GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing indieauth.com — IndieAuth for Developers
IndieAuth.com is being replaced.
Websites using it as their IndieAuth server can move to
IndieKey; developers signing users
in should use IndieLogin.com.
IndieAuth.com for Developers
Due to confusion around the name, this service is being deprecated and will eventually be shut down. If you use IndieAuth.com to sign users in to your app, as this page describes, the replacement is IndieLogin.com: it signs people in the same way, and your users need not change anything on their own sites. Note that it requires registering your
client_id first. See indieweb.org for the background.
Using IndieAuth.com to sign users in to your websiteIf you are building a website and need to sign people in, you can use IndieAuth.com to handle web sign-in so that you don't have to implement OAuth code for each provider. 1. Create a Web Sign-in form<form action="https://indieauth.com/auth" method="get"> <label for="indie_auth_url">Web Address:</label> <input id="indie_auth_url" type="text" name="me" placeholder="yourdomain.com" /> <p><button type="submit">Sign In</button></p> <input type="hidden" name="client_id" value="https://example.com/" /> <input type="hidden" name="redirect_uri" value="https://example.com/callback" /> </form>
Parameters
2. The user logs in with their domainAfter the user enters their domain in the sign-in form and submits, indieauth.com goes and scans their domain looking for rel="me" links from providers it knows about (see Supported Providers above). It also verifies that the third-party website links back to the user's domain with a rel="me" link as well. 3. The user is redirected back to your site
If everything is successful, the user will be redirected back to the redirect_uri you specified in the form. There will be a token in a query string parameter, 4. Verify the authorization code with indieauth.comAt this point you need to verify the code which will also return the domain name of the authenticated user. Make a POST request to indieauth.com/auth with the code and all the original parameters of the request, and you will get back the domain name of the authenticated user. POST https://indieauth.com/auth HTTP/1.1 Content-Type: application/x-www-form-urlencoded;charset=UTF-8 Accept: application/json code=gk7n4opsyuUxhvF4& redirect_uri=https://example.com/callback& client_id=https://example.com/ An example successful response: HTTP/1.1 200 OK
Content-Type: application/json
{
"me": "https://aaronparecki.com/"
}
An example error response: HTTP/1.1 404 Not Found
Content-Type: application/json
{
"error": "invalid_request",
"error_description": "The code provided was not valid"
}
5. Done!At this point you know the domain belonging to the authenticated user. You can store the domain secure session and log the user in with their domain name identity. You don't need to worry about whether they authenticated with Google, Twitter or Github, their identity is their domain name! You won't have to worry about merging duplicate accounts or handling error cases when Twitter is offline.
This server is hosted by sponsors of IndieWebCamp events. v17.207.1 2.4.3-p205
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |