-
Notifications
You must be signed in to change notification settings - Fork 19
feat: oidc implementation #176
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
feat: oidc implementation #176
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
approach lgtm, however, 1 missing scenario
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.
[M] let's check how do we generate sitemap here and add filter for callback
This pull request includes several changes that enhance the login flow, add new components, and update dependencies. The most important changes include the introduction of a new login handling hook, the addition of a callback page, and updates to existing components to use the new login handling mechanism.
Enhancements to login flow:
src/hooks/useHandleLogin/index.tsx
: IntroduceduseHandleLogin
hook to handle the new login flow using OIDC, which redirects users to the OAuth2 authorization page if OAuth2 is enabled, or falls back to the legacy OAuth URL otherwise.New components:
src/features/Callback/CallbackPage.tsx
andsrc/features/Callback/index.ts
: AddedCallbackPage
component to handle successful sign-in and update login accounts. [1] [2]src/pages/callback.tsx
: Added a new page to render theCallbackPage
component and hide the navbar on load.Updates to existing components:
src/components/UserNavbarItem/item.desktop.tsx
: UpdatedSignedInActions
to usehandleLogin
fromuseHandleLogin
instead ofhandleClick
. [1] [2]src/features/Apiexplorer/LoginDialog/index.tsx
: ModifiedLoginDialog
to usehandleLogin
fromuseHandleLogin
for the login button. [1] [2] [3]src/features/Login/Login.tsx
: UpdatedLogin
component to usehandleLogin
fromuseHandleLogin
for the login button. [1] [2] [3]src/features/dashboard/dashboard.tsx
andsrc/pages/auth.tsx
: WrappedLogin
component withBrowserOnly
to ensure it only renders on the client side. [1] [2] [3] [4]Dependency updates:
package.json
: Updated@deriv-com/auth-client
dependency from version^1.0.29
to^1.2.15
.Utility function enhancements:
src/utils/index.ts
andsrc/utils/__tests__/utils.test.ts
: AddedtransformAccountsFromResponseBody
function to transform account response data into an array of objects, and included corresponding tests. [1] [2] [3] [4]