supertokens / supertokens-node

Node SDK for SuperTokens core
https://supertokens.com
Other
278 stars 72 forks source link

fix(normaliseUrlDomain): allow custom url scheme #796

Open zaosoula opened 4 months ago

zaosoula commented 4 months ago

Summary of change

Refactor the code of normaliseUrlDomainOrThrowError to accept schemes other than http://, https://, supertokens:// (A few sentences about this PR)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

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

Remaining TODOs for this PR


Ellipsis :rocket: This PR description was created by Ellipsis for commit e6c547703bebc6d7c6e378a78d9a394abe92a3ea.

Summary:

The PR modifies the normaliseURLDomainOrThrowError function to accept URL schemes other than http://, https://, and supertokens://, by adding a default protocol if none is provided, and returning the URL string with the appropriate protocol and host.

Key points:


Generated with :heart: by ellipsis.dev

netlify[bot] commented 4 months ago

Deploy Preview for astounding-pegasus-21c111 canceled.

Name Link
Latest commit f6c37a66f2de4ddb7e2cbf551275ff593ddf2c9f
Latest deploy log https://app.netlify.com/sites/astounding-pegasus-21c111/deploys/665df5567170e00008b4342e
netlify[bot] commented 4 months ago

Deploy Preview for precious-marshmallow-968a81 canceled.

Name Link
Latest commit f6c37a66f2de4ddb7e2cbf551275ff593ddf2c9f
Latest deploy log https://app.netlify.com/sites/precious-marshmallow-968a81/deploys/665df556ca13910008268a04
zaosoula commented 4 months ago

@rishabhpoddar Here is the pr, unfortunatly I'm unable to launch the test env for now, so if you can give it a try

rishabhpoddar commented 4 months ago

@zaosoula i'll probably try it out later today or sometime this week. In the meantime, you can use your forked version of the sdk instead of the one from npm in your app and see if it works well. Also, you may have to make a similar change to the frontend sdk as well cause that too has the same normalised domain class

rishabhpoddar commented 2 months ago

Hey @ellipsis, give me a code review

ellipsis-dev[bot] commented 2 months ago

OK! Reviewing this PR...


Responding to this comment by @rishabhpoddar. For more information about Ellipsis, check the documentation.

zaosoula commented 1 month ago

@rishabhpoddar I fixed the issues

(@ellipsis-dev)