react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

SSO Redirect URI route not functional

Open hdotson1 opened this issue 1 year ago • 1 comments

What you were expecting: The functional redirect route for React admin should be /auth-callback

What happened instead: When landing on <app domain>/auth-callback I am redirected to the dashboard page of my app, but if I navigate to <app domain>/#/auth-callback then my handleCallback code in my AuthProvider is run as expected. This is a problem because <app domain>/#/auth-callback is not a valid SSO redirect URI per the Oauth 2.0 spec because it contains a fragment. Per the docs I would expect /auth-callback to work (without a #, but that does not seem to be true.

Steps to reproduce:

  1. Use Okta SSO JS to set up an auth provider that defines a handleCallback function.
  2. The handleCallback code will trigger when landing on /#/auth-callback and not when landing on /auth-callback

hdotson1 avatar Dec 09 '24 18:12 hdotson1

Hi, that's why we allow you to provide your own router as explained in the documentation: https://marmelab.com/react-admin/Admin.html#using-a-custom-router. In your case, use a browser router

djhi avatar Dec 10 '24 15:12 djhi