supertokens-auth-react
supertokens-auth-react copied to clipboard
Make AuthWrapper independent of the recipe name
Right now, auth wrappers are called based on the name of their recipe. Like <EmailPasswordAuth>, or <ThirdPartAuth>.
This adds extra code and extra docs - both of which require more time to make.
Instead, we should:
- Have one component like:
import {SuperTokensAuth} from "supertokens-auth-react"; <SuperTokensAuth> <Dashboard /> </SuperTokensAuth> SuperTokensAuthwill work only for Auth recipes (not session, not email verification)SuperTokensAuthwill need to detect which Auth recipe is being used.- We can keep the current auth wrappers and mark them as deprecated for backwards compatibility.
Problems
- Edge case: What if multiple auth recipes are being used, then which one should be redirected to on sign out / session expiry?