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: Allow returning null from getRedirectionURL override #766

Merged
merged 24 commits into from
Dec 11, 2023

Conversation

anku255
Copy link
Contributor

@anku255 anku255 commented Nov 23, 2023

Summary of change

This PR updates getRedirectionURL signature to allow returning null that would prevent redirection.

Related issues

Test Plan

I have written one unit test and added some code in with-typescript repo to test the function signature. Also added e2e tests for emailpassword and passwordless signups.

Documentation changes

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

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

Remaining TODOs for this PR

  • Write e2e test
  • Update package version
  • Update documenation
  • Remove success screen
  • Add a setInterval that runs every 2s and redirect if session exists in passwordless
  • Update success screen doc

Copy link

github-actions bot commented Nov 23, 2023

size-limit report 📦

Path Size
lib/build/index.js 14.46 KB (+1.58% 🔺)
recipe/session/index.js 15.38 KB (+1.33% 🔺)
recipe/session/prebuiltui.js 18.14 KB (+1.41% 🔺)
recipe/thirdpartyemailpassword/index.js 30.17 KB (+0.83% 🔺)
recipe/thirdparty/index.js 26.79 KB (+0.85% 🔺)
recipe/emailpassword/index.js 10.23 KB (+2.15% 🔺)
recipe/emailverification/index.js 7.47 KB (+2.82% 🔺)
recipe/passwordless/index.js 63.9 KB (+0.33% 🔺)
recipe/thirdpartypasswordless/index.js 83.92 KB (+0.3% 🔺)
recipe/emailverification/prebuiltui.js 22.82 KB (+1.02% 🔺)
recipe/thirdpartyemailpassword/prebuiltui.js 54.4 KB (+0.62% 🔺)
recipe/thirdparty/prebuiltui.js 38.89 KB (+0.69% 🔺)
recipe/emailpassword/prebuiltui.js 28.16 KB (+0.9% 🔺)
recipe/passwordless/prebuiltui.js 103.01 KB (-0.22% 🔽)
recipe/thirdpartypasswordless/prebuiltui.js 130.18 KB (-0.17% 🔽)
recipe/multitenancy/index.js 6.28 KB (+2.65% 🔺)

@anku255 anku255 marked this pull request as draft November 23, 2023 14:51
@anku255 anku255 marked this pull request as ready for review November 24, 2023 07:42
examples/for-tests/src/App.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Outdated Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Outdated Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
lib/ts/types.ts Outdated Show resolved Hide resolved
@anku255 anku255 changed the base branch from 0.35 to 0.36 December 1, 2023 06:53
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
lib/ts/utils.ts Outdated Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
test/end-to-end/getRedirectionURL.test.js Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
lib/ts/types.ts Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
lib/ts/recipe/recipeModule/index.ts Outdated Show resolved Hide resolved
lib/ts/recipe/recipeModule/index.ts Outdated Show resolved Hide resolved
lib/ts/recipe/recipeModule/types.ts Outdated Show resolved Hide resolved
lib/ts/recipe/recipeModule/types.ts Outdated Show resolved Hide resolved
lib/ts/recipe/session/recipe.tsx Outdated Show resolved Hide resolved
lib/ts/recipe/session/sessionAuth.tsx Outdated Show resolved Hide resolved
test/with-typescript/src/App.tsx Show resolved Hide resolved
@anku255 anku255 requested a review from rishabhpoddar December 7, 2023 13:44
…ionURLContext (#772)

* Update userContext type and make it required in internal functions

* Add isNewPrimaryUser in GetRedirectionURLContext

* PR changes
@rishabhpoddar rishabhpoddar merged commit 5819ad9 into 0.36 Dec 11, 2023
21 of 23 checks passed
@rishabhpoddar rishabhpoddar deleted the feat/get-redirection-url-allow-null branch December 11, 2023 07:14
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.

3 participants