-
Notifications
You must be signed in to change notification settings - Fork 474
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
Remove the ability to change the refresh API path completely, and instead, allow the users to give a prefix to the API #65
Comments
@NkxxkN I have implemented functions for normalising paths and domains in a very extensive way with many tests (as per the above spec). Please use those functions & tests, otherwise please make sure to test your functions in a very similar manner (if not better). I prefer if the exact same function is used in all places for this, so if you want to keep yours, I can have a look at the them, and then change the one in the
|
* implements functions for normalsing domains and paths as per supertokens/supertokens-core#65 * updates FDI version * gets all tests to pass
@NkxxkN please feel free to review the two functions above, and think of other tests I may have missed |
* changes as per issue supertokens/supertokens-core#65 * gets all tests to pass * adds config tests
The refresh API will always be
{some-prefix}/session/refresh
. The prefix can be defined by the user. This will make it easier for users to use login + sessions using us.apiBasePath
. The default value of this will be/auth
. However the user can override it by providing:https://example.com/custom-base/
=>/custom-base
/custom-base/
=>/custom-base
/
=>""
OR""
=>""
custom/base
=>/custom/base
custom/base/.
=>/custom/base
/custom/base
=>/custom/base
custom/base/
=>/custom/base
custom/base/
=>/custom/base
custom-base
=>/custom-base
#
or anything else, remove them.apiDomain
. This is a compulsory value. It can be of the form:example.com
=>https://example.com
example.com/
=>https://example.com
http://example.com
=>http://example.com
https://example.com/ =>
https://example.com`localhost
⇒http://localhost
IP Address
⇒http://IP Address
#
, remove themTherefore, on the frontend, the refresh endpoint will be:
${apiDomain}${apiBasePath}/session/refresh
On the backend, the API will listen for the path
${apiBasePath}/session/refresh
Tasks
The text was updated successfully, but these errors were encountered: