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

5.2 Initiate Authentication Request #3

Open
EdwardHinkle opened this issue Jun 10, 2019 · 2 comments
Open

5.2 Initiate Authentication Request #3

EdwardHinkle opened this issue Jun 10, 2019 · 2 comments
Assignees
Milestone

Comments

@EdwardHinkle
Copy link
Owner

There needs to be a function that an App can call within IndieWebKit that builds and makes the Authentication Request. It will need to be able to customize the callback per app.

The client builds the authentication request URL by starting with the discovered authorization_endpoint URL and adding the following parameters to the query component:

me - The user's profile URL
client_id - The client URL
redirect_uri - The redirect URL indicating where the user should be redirected to after approving the request
state - A parameter set by the client which will be included when the user is redirected back to the client. This is used to prevent CSRF attacks. The authorization server MUST return the unmodified state value back to the client.
response_type=id - (optional) Indicates to the authorization server that this is an authentication request. If this parameter is missing, the authorization endpoint MUST default to id.

https://indieauth.spec.indieweb.org/#authentication-request

@EdwardHinkle EdwardHinkle added this to the 1.0.0 milestone Jun 10, 2019
@EdwardHinkle EdwardHinkle self-assigned this Jun 10, 2019
@EdwardHinkle
Copy link
Owner Author

Also during this we will want to handle adding support for PKCE:

The client establishes its identity by generating a random secret.
When the client redirects the user to the authorization server, it includes a one-way hashed version of this secret, known as the code_challenge, which the server will store, along with a code_challenge_method describing the hashing algorithm used to make the hash.

https://www.oauth.com/oauth2-servers/pkce/
https://indieweb.org/PKCE#See_Also

EdwardHinkle pushed a commit that referenced this issue Jun 10, 2019
…ding parsing logic for handling the authentication response callback
EdwardHinkle pushed a commit that referenced this issue Jun 11, 2019
…nticationSession is commented out before it breaks testing until I can figure out how to conditionally import it only on the proper OSs
@EdwardHinkle
Copy link
Owner Author

This is almost entirely finished. The framework since it is multi-platform is breaking on using ASWebAuthenticationSession, so that needs to be figured out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant