Cannot Link to the callbackUrl #32
-
Hello, I wanted to have multiple strategies in one app, (remix-auth-form & remix-auth-oauth2). Bellow the "basic" auth form, a link to oauth callbackUrl. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The callback url is to where the Identity Provider will redirect the user after authorizing the login. You should have a login route with a Sign In button per provider, then make those buttons take the user to a route where you call the authorize method, this should be different than the callback url, from this the strategy will take the user to the identity provider authorization endpoint and then redirect them back to the callback url of your app. Check the instructions on https://github.com/sergiodxa/remix-auth-github to see how it’s used, that strategy extends the OAuth2Strategy. |
Beta Was this translation helpful? Give feedback.
The callback url is to where the Identity Provider will redirect the user after authorizing the login.
This is not to where you take the user to start the authorization process.
You should have a login route with a Sign In button per provider, then make those buttons take the user to a route where you call the authorize method, this should be different than the callback url, from this the strategy will take the user to the identity provider authorization endpoint and then redirect them back to the callback url of your app.
Check the instructions on https://github.com/sergiodxa/remix-auth-github to see how it’s used, that strategy extends the OAuth2Strategy.