SuperTokens Web JS SDK
About
This is a plain Javascript SDK that provides the login functionality with SuperTokens.
Learn more at https://supertokens.com
Documentation
To see documentation, please click here.
Contributing
Please refer to the CONTRIBUTING.md file in this repo.
Contact us
For any queries, or support requests, please email us at team@supertokens.com, or join our Discord server.
Authors
Created with :heart: by the folks at SuperTokens.com.
[0.7.0] - 2023-07-19
Added
- Multitenancy recipe
- Added an overrideable
getTenantIdFromURL
to multiple recipes - Optional
clientType
config in the input for SuperTokens.init
function, that is used by thirdparty and multitenancy recipes.
Breaking changes
- Only supporting FDI 1.17
- Backend SDKs have to be updated first to a version that supports multi-tenancy for thirdparty
- supertokens-node: >= 15.0.0
- supertokens-golang: >= 0.13.0
- supertokens-python: >= 0.15.0
- In ThirdParty recipe,
- Changed signatures of the functions
getAuthorisationURLWithQueryParamsAndSetState
- Removed functions -
setStateAndOtherInfoToStorage
, getAuthorisationURLFromBackend
, generateStateToSendToOAuthProvider
, verifyAndGetStateOrThrowError
, getAuthCodeFromURL
, getAuthErrorFromURL
, getAuthStateFromURL
- In ThirdPartyEmailpassword recipe,
- Changed signatures of the functions
getAuthorisationURLWithQueryParamsAndSetState
- Removed functions -
setStateAndOtherInfoToStorage
, getAuthorisationURLFromBackend
, generateStateToSendToOAuthProvider
, verifyAndGetStateOrThrowError
, getAuthCodeFromURL
, getAuthErrorFromURL
, getAuthStateFromURL
- In ThirdPartyPasswordless recipe,
- Changed signatures of the functions
getThirdPartyAuthorisationURLWithQueryParamsAndSetState
- Removed functions -
setThirdPartyStateAndOtherInfoToStorage
, getAuthorisationURLFromBackend
, generateThirdPartyStateToSendToOAuthProvider
, verifyAndGetThirdPartyStateOrThrowError
, getThirdPartyAuthCodeFromURL
, getThirdPartyAuthErrorFromURL
, getThirdPartyAuthStateFromURL
Changes
- Updates dependencies and backend config for the vue with-thirdpartyemailpassword example app
Migration
Renamed parameters in getAuthorisationURLWithQueryParamsAndSetState
Before:
const authUrl = await ThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
providerId: "google",
authorisationURL: `${websiteDomain}/auth/callback/google`,
});
After:
const authUrl = await ThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
thirdPartyId: "google",
frontendRedirectURI: `${websiteDomain}/auth/callback/google`,
});
If the provider is redirecting to the backend directly (i.e.: Apple)
Before:
const authUrl = await ThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
providerId: "apple",
authorisationURL: `${websiteDomain}/auth/callback/apple`,
});
After:
const authUrl = await ThirdPartyEmailPassword.getAuthorisationURLWithQueryParamsAndSetState({
thirdPartyId: "apple",
frontendRedirectURI: `${websiteDomain}/auth/callback/apple`,
redirectURIOnProviderDashboard: `${apiDomain}/auth/callback/apple`
});