-
Is there any way to combine the OAuth authorization code grant with passwordless?
Basically, we want to drop someone into the authorization code grant but not use the standard FusionAuth passwordless flow.
Right now if we set up passwordless we see the following:
- Generate a passwordless code, send the user an email
- The user clicks a link back to /oauth2/passwordless/{code}
- We consume the code, call the Passswordless Login API, and if good to go, we treat this as a successful credentialed login and redirect to their
redirect_uriwith an auth code.
We'd like to do the same thing but with our SPA using an OIDC library, not with the FusionAuth code.
Is this possible?
-
This is possible. Doing so allows you to weave passwordless into the normal OAuth flow so you can use standard OAuth libraries but not have your user enter a password.
- Start the passwordless login on the server side (using the API).
- Get the passwordless code.
- Send this url to the client:
[FusionAuthURL]/oauth2/passwordless/[passwordlesscode]?redirect_uri=[redirect URI]&response_type=code&client_id=[client_id]. - Have the client request this url.
- It'll be just as if the user had authenticated via the
/oauth2/authorizeendpoint and the user had entered their credentials. You'll get back an authorization code which can then be exchanged for an access token/JWT.
-
D dan moved this topic from Q&A on
-
D dan moved this topic from Frequently Asked Questions (FAQ) on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login