Search code examples
admin-on-rest

How to make OAuth implicit flow work with admin-on-rest?


With OAuth implicit flow when we authenticate the SPA gets a redirect which has the access_token and id_token as hash fragment, but this doesn't work with the hash-based routing of admin-on-rest. Is there a way to get the hash fragments other than creating a custom Admin component with Browser router?


Solution

  • You can pass your own instance of history to the admin component (not documented yet: see the code. By default its the hashHistory. See history documentation for other options.