Skip to content

Conversation

thisyahlen-deriv
Copy link

@thisyahlen-deriv thisyahlen-deriv commented Dec 3, 2024

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: Introduced useHandleLogin 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 and src/features/Callback/index.ts: Added CallbackPage component to handle successful sign-in and update login accounts. [1] [2]
  • src/pages/callback.tsx: Added a new page to render the CallbackPage component and hide the navbar on load.

Updates to existing components:

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 and src/utils/__tests__/utils.test.ts: Added transformAccountsFromResponseBody function to transform account response data into an array of objects, and included corresponding tests. [1] [2] [3] [4]

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
deriv-api-docs ✅ Ready (Inspect) Visit Preview Dec 5, 2024 6:07am

@thisyahlen-deriv thisyahlen-deriv changed the title chore: oidc implementation feat: oidc implementation Dec 3, 2024
Copy link
Contributor

@amam-deriv amam-deriv left a 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

Copy link
Contributor

@amam-deriv amam-deriv left a 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

@shafin-deriv shafin-deriv merged commit fd00b8b into deriv-com:master Dec 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants