ra-example-oauth icon indicating copy to clipboard operation
ra-example-oauth copied to clipboard

Change example to use PKCE authorization code flow

Open JaneJeon opened this issue 4 years ago • 0 comments

@Kmaschta @exabugs

So I noticed that the server call is mandatory in this example because it is using OIDC secrets directly to look up the token. However, it is actually possible to do frontend-only authentication with OIDC (in fact, the library that you’re using - oidc-client - actually handles ALL of the bespoke authorization code flow logic that you’ve implemented in your authProvider); however, there is literally zero example of such flow being implemented with react-admin, and react-admin really does NOT play well with the redirects of the OIDC code flow.

Therefore it would be INSANELY nice if you could drop the unnecessary server call and implement a proper OIDC code flow with react-admin’s authProvider. Thank you.

JaneJeon avatar Feb 17 '21 02:02 JaneJeon