supertokens / supertokens-node

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

Using .local TLD for apiDomian or websiteDomain leads to parsing error #823

Closed tobiasbeck closed 2 months ago

tobiasbeck commented 2 months ago

Parsing .local tlds leads to a Please make sure that the apiDomain and websiteDomain have correct values error.

The reason for this is that psl, which is used under the hood to validate the url is not parsing .local tld's (see here) which leads to a the mentioned error.

rishabhpoddar commented 2 months ago

Whats the use case of using .local tlds? If it's not there in that list, it's not an actual TLD right? Maybe I am missing something here.

tobiasbeck commented 2 months ago

In my case I'm using Orbstack as my container runtime during development. Orbstack automatically generates domains (documentation) for the development containers following the schema <container-name>.orb.local, which are only accessible locally since .local only routes in the local network it would make sense in my eyes to not validate it, just like its already done with localhost domains.

This also behaves differently from the supertokens-golang sdk which works with .local domains just fine

rishabhpoddar commented 2 months ago

Fair enough. Thanks for the info. We will work on fixing this.

rishabhpoddar commented 2 months ago

This has been fixed in node sdk version >= 17.0.5