Skip to content
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

refactor(react): refactor react sdk to provide server side support #50

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dasuni-30
Copy link
Contributor

Purpose

  • Refactor client-side useEffects:
    Moved useEffects out of React UI components to be used in both the react and nextjs. Developed a separate general SignIn UI component that can be reused in both React and Nextjs

    • Refactored Authorize API call useEffect
    • Refactored Branding API call useEffect
  • Implement Global Data Store:
    Identified that the Local Storage cannot be used in the Nextjs SDK. Created a new global data store for state management in nextjs. Used memory-cache package similar to the node SDK .

  • Import Common Components:

    • Imported Cryptoutils for handling encryption and decryption tasks to be reused in Nextjs SDK.
    • Exposed other required SignIn components to be used in Nextjs.
  • Server-Side API Implementation:

    • Implement authorize API call on the server side. Pass the client ID and secret in the app native authorize API call.
    • Implement branding API call on the server side to optimize data fetching and rendering.

Related Issues

  • None

Related PRs

  • None

Checklist

  • e2e cypress tests locally verified.
  • Manual test round performed and verified.
  • UX/UI review done on the final implementation.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)
  • Integration tests provided. (Add links if there are any)

Security checks

@dasuni-30 dasuni-30 marked this pull request as draft August 13, 2024 06:47
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.

1 participant