-
Notifications
You must be signed in to change notification settings - Fork 9
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
♻ Implement PKCE auth using react-oidc
library
#4916
Comments
Currently blocked on localhost issues.
|
@petertgiles are these blockers still valid to implement this issue? |
To get around these issues we would need to stop using the localhost domain on our workstations. As we didn't have much luck with IMTD setting up a loopback domain for us we decided as a team that we would be willing to edit our workstation hosts files. That should unblock this issue. |
Icebox because we might actually get to SSR before we get to this 😆 |
react-oidc
library
Description
In our current authentication strategy, the client makes a call to our API, which communicates with an OAuth 2.0 identity provider, exchanging a client secret for access tokens, and then passes tokens back to the client using url query variables.
We want to replace this with an OAuth authentication flow using PKCE, where the client can request tokens directly from the identity provider. To make this refactor easier, we want to use a frontend library to handle the auth flow in the background.
@patcon previously researched auth module options in #2572, and recommended https://github.com/AxaGuilDEv/react-oidc. We have chosen this library because it has good active support, and unlike other options, it protects against XSRF attacks by storing tokens in a service worker instead of localStorage or a cookie.
The library suggest that the service worker can inject tokens directly into fetch requests, which may make it unnecessary to use auth-exchange in urql. That probably requires testing.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: