All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning
- Handles
Uncaught ReferenceError: process is not defined
during getting if testing or not.
- Styling issues with SVG icons
- In
emailVerificationAuth
, querying for is email verified only if a session exists - A few test app issues
- If visiting auth page with session already existing, then we respect redirectTo query param
- Uses
useRef
hook when usingwithRouter
so that the underlying component is not unmounted. - If
redirectToPath
is "", and we are not using react-router-dom, then we redirect to/
, otherwise we might be stuck in an infinite redirect loop.
- Uses
SessionAuth
for all our components: supertokens#241 - Creates an
AuthWidgetWrapper
component that will redirect login UI if already logged in
- Allows for
SessionAuth
to be inside anotherSessionAuth
. - Updates session context on session changes: supertokens#228
onSessionExpired
optional prop onSessionAuth
,EmailPasswordAuth
,ThirdPartyAuth
andThirdPartyEmailPasswordAuth
-
If a component is wrapped in an auth wrapper with
requiredAuth={true}
, andonSessionExpired
is not provided, then the user will be automatically redirected to the login screen in case of session expiry. -
The components override API has changed from
(DefaultComponent) => (props) => React.Element
to({ DefaultComponent, …props }) => React.Element
.
- Normalisation of thirdpartyemailpassword input
- Allows zero thirdparty providers to be passed into thirdpartyemailpassword
- Respects
disableEmailPassword
config provided to thirdpartyemailpassword
- Makes
signInAndUpFeature
config optional inthirdpartyemailpassword.init
- Ability to override recipe functions to customize the behavior of feature components.
- Refactors code to:
- Make types simpler.
- Remove components folder from AuthRecipeModule, and puts them in the themes of the respective recipes.
- Uses redirectToAuth everywhere instead of calling redirect manually.
- Adds additional props / config to Session and EmailVerification recipe to make them more isolated
- Passes recipe to feature components directly, as opposed to recipeId
- In session recipe, we remove
setAuth0API
andgetAuth0API
- Removes
GET_REDIRECTION_URL
from the possible action types forgetRedirectionURL
. - Changes
redirectToAuth
to take an object and addsredirectBack
param, which can be used to indicate if the user should be redirected to the current page. - Removes
getRefreshURLDomain
function from session recipe. - Moves
SIGN_OUT
even and pre API hook into the Session recipe. - Change to type of
preAPIHook
function - Uses supertokens-website version >= 8.0
- Changed
SIGN_IN
,SIGN_UP
Pre API hook action toEMAIL_PASSWORD_SIGN_IN
,EMAIL_PASSWORD_SIGN_UP
orTHIRD_PARTY_SIGN_IN_UP
- State update post unmounting when using EmailVerification wrapper.
- Allow specifying of
cookieDomain
in config to add interceptors to multiple API subdomain: supertokens/supertokens-website#58
- Respects case sensitive when redirecting post login: supertokens#252
- Support for sessions if used within an iframe: supertokens/supertokens-website#53
- Update to supertokens-website dependency version
- Fixes supertokens#220
- When using
getSuperTokensRoutesForReactRouterDom
, use it likegetSuperTokensRoutesForReactRouterDom(require("react-router-dom"))
- Config value
useReactRouterDom
is no longer required. React router dom is enabled only if the user usesgetSuperTokensRoutesForReactRouterDom
.
- Uses frontend set cookies instead of localstorage so that sub domain session works on Safari
- Sends
rid
on each request - acts as a CSRF protection measure (see https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#use-of-custom-request-headers) - Refreshes session if the frontend set cookies are deleted (due to privacy features in Safari).
- New FDI 1.8
- Adds
apiGatewayPath
inappInfo
. Related to supertokens/supertokens-core#234
- Ability to send custom error messages from signinup API for thirdparty login to show in the UI. Fixes issue supertokens/supertokens-core#233
- Exports
SessionAuth
wrapper - Adds
requireAuth
boolean to all Auth wrappers to protect pages optionally - Creates a session context that is passed to child components for easy access to session info.
getUserId
anddoesSessionExist
returningPromises
- Signout function from session
- Compatibility with FDI 1.7
- Adds
redirectToAuth
function for all auth recipes
- Removed type dependency on History
- Fix URL Normalisation with "/.netlify/functions/api".
- Fix Path Normalisation with "/.netlify/functions/api" given as apiBasePath
- Third Party & Email Password recipe
- Update preAPIHook type from
({RequestInit, action}) => Promise<RequestInit>
to({url, RequestInit, action}) => Promise<RequestInit | {RequestInit, url}>
- Third Party recipe with Google/Github/Facebook/Apple
- Introduce AuthRecipeModule to abstract common functions (hooks, signout, isEmailVerified)
- Email Verification as a recipe
- Email Password context from
{action: "SIGN_IN_COMPLETE" | "SIGN_UP_COMPLETE"}
to{action: "SUCCESS", isNewUser: boolean}
- Fix react-router-dom issue with EmailPasswordAuth in NextJS.
- Supertokens config
useReactRouterDom
.
- Compare window.location.origin to websiteDomain for redirection => useful for multitenancy
- Fix websiteBasePath = "/" routing issue.
- Fix getRedirectionURL hook type
- No redirectToPath in email verification screen
- Redirect to intended page post authentication
- Use tsconfig to compile instead of babel
- Success/Error ticks displayed in input
- Show password displayed in inputs
- Better password manager handling
- Remove autofill browser styling
- User Facing typescript definitions
- setState race condition for redirecting to auth page on successful signup
- Examples folder
- Input border radius from 8 to 6px
- Input padding from 20 to 16px
- Input background colour from 1 to 0.25 opacity on focus
- Add focus state box shadow
- Show password icon only when password is not empty
- Fix width when wrapped in flex container
- Fix right input padding
- Mobile responsiveness
- Email Verification Feature
- Show/Hide password
- Success tick
- Design revamp
- Remove generalErrorBackground
- Button ripple effect on click
- Button colour change on hover
- Upgrade to Emotion v11 and react-shadow v19
- Fix conflicting dependencies with npm link
- No Shadow DOM for Internet Explorer
- Made config optional when calling init for recipes
- Better error message for SSR.
- Add margin bottom for general Errors.
- Move react-router-dom to optional dependencies.
- Form validation on blur
- verify if email exists on blur during signup
- Autocomplete email and password
- Move error/success ticks to leave space for password managers
DefaultToSignUp
config and default widget to sign up form.
- Remove all styles from feature wrapper
- Email and password implementation
- Session implementation