-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add /login-callback
route and optional new authProvider.handleLoginCalback()
method
#8457
Conversation
…nCalback` method ## Problem When using third party services such as Auth0, you currently need to setup a custom route and work around the authProvider methods. ## Solution Introduce a new route at `/login-callback` that can be set as the callback endpoint for third party authentication services. This route will call the new `handleLoginCallback` optional method of the `AuthProvider` then redirect to the home page by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encouraging!
When using external authentication services such as those implementing OAuth, you usually need a callback route. React-admin provides a default one at `/login-callback`. It will call the `AuthProvider.handleLoginCallback` method | ||
that may validate the params received from the URL and redirect users to any page (the home page by default) afterwards. | ||
|
||
It's up to you to decide when to redirect users to the third party authentication service, for instance: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit confusing. Could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get what's confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why this section occurs here. It has nothing to do with the login callback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I introduce a new dedicated page to third party authentication services ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least a section in the Authentication introduction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the authentication introduction page
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
When using external authentication services such as those implementing OAuth, you usually need a callback route. React-admin provides a default one at `/login-callback`. It will call the `AuthProvider.handleLoginCallback` method | ||
that may validate the params received from the URL and redirect users to any page (the home page by default) afterwards. | ||
|
||
It's up to you to decide when to redirect users to the third party authentication service, for instance: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why this section occurs here. It has nothing to do with the login callback
Awesome! |
handleLoginCalback
method/login-callback
route and optional new authProvider.handleLoginCalback()
method
Problem
When using third party services such as Auth0, you currently need to setup a custom route and work around the authProvider methods.
Solution
Introduce a new route at
/login-callback
that can be set as the callback endpoint for third party authentication services. This route will call the newhandleCallback
optional method of theAuthProvider
then redirect to the home page by default.Tasks