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

feat: Update userContext type and add isNewPrimaryUser in GetRedirectionURLContext #772

Merged

Conversation

anku255
Copy link
Contributor

@anku255 anku255 commented Dec 7, 2023

Summary of change

This PR -

  • Updates type of userContext from any to Record<string, unknown>
  • Make userContext required in internal functions wherever possible
  • Uses getNormalisedUserContext to populate userContext wherever it was not available/passed
  • Add isNewPrimaryUser boolean in GetRedirectionURLContext

Checklist for important updates

  • Changelog has been updated
  • frontendDriverInterfaceSupported.json file has been updated (if needed)
  • Changes to the version if needed
    • In package.json
    • In package-lock.json
    • In lib/ts/version.ts
  • Had run npm run build-pretty
  • Had installed and ran the pre-commit hook
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.
  • If added a new recipe interface, then make sure that the implementation of it uses NON arrow functions only (like someFunc: function () {..}).
  • If I added a new recipe, I also added the recipe entry point into the size-limit section of package.json with the size limit set to the current size rounded up.
  • If I added a new recipe, I also added the recipe entry point into the rollup.config.mjs

Copy link

github-actions bot commented Dec 7, 2023

size-limit report 📦

Path Size
lib/build/index.js 14.46 KB (+0.28% 🔺)
recipe/session/index.js 15.38 KB (+0.23% 🔺)
recipe/session/prebuiltui.js 18.14 KB (+0.23% 🔺)
recipe/thirdpartyemailpassword/index.js 30.17 KB (+0.1% 🔺)
recipe/thirdparty/index.js 26.79 KB (+0.1% 🔺)
recipe/emailpassword/index.js 10.23 KB (+0.23% 🔺)
recipe/emailverification/index.js 7.47 KB (+0.16% 🔺)
recipe/passwordless/index.js 63.9 KB (+0.05% 🔺)
recipe/thirdpartypasswordless/index.js 83.92 KB (+0.04% 🔺)
recipe/emailverification/prebuiltui.js 22.82 KB (+0.26% 🔺)
recipe/thirdpartyemailpassword/prebuiltui.js 54.4 KB (+0.3% 🔺)
recipe/thirdparty/prebuiltui.js 38.89 KB (+0.26% 🔺)
recipe/emailpassword/prebuiltui.js 28.16 KB (+0.32% 🔺)
recipe/passwordless/prebuiltui.js 103.01 KB (+0.13% 🔺)
recipe/thirdpartypasswordless/prebuiltui.js 130.18 KB (+0.13% 🔺)
recipe/multitenancy/index.js 6.28 KB (+0.07% 🔺)

@anku255 anku255 changed the title Update userContext type and add isNewPrimaryUser in GetRedirectionURLContext feat: Update userContext type and add isNewPrimaryUser in GetRedirectionURLContext Dec 7, 2023
@rishabhpoddar rishabhpoddar merged commit 9379e48 into feat/get-redirection-url-allow-null Dec 11, 2023
20 of 23 checks passed
@rishabhpoddar rishabhpoddar deleted the feat/update-usercontext-type branch December 11, 2023 07:08
rishabhpoddar added a commit that referenced this pull request Dec 11, 2023
* feat: Allow returning null from getRedirectionURL override

* feat: Update version and include e2e tests

* Update CHANGELOG.md

Co-authored-by: Rishabh Poddar <[email protected]>

* Remove success screen in passwordless login

* Fix examples

* Update version and Changelog

* Update version

* Delete watchmanconfig

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update changelog

* Redirect only if url changes

* PR changes

* Update history type, userContext in getRedirectURL

* Rename history to navigate

* Update changelog

* Update lib/ts/recipe/recipeModule/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/recipeModule/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* PR changes

* Update changelog

* feat: Update userContext type and add isNewPrimaryUser in GetRedirectionURLContext (#772)

* Update userContext type and make it required in internal functions

* Add isNewPrimaryUser in GetRedirectionURLContext

* PR changes

---------

Co-authored-by: Rishabh Poddar <[email protected]>
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.

2 participants