Redirect To Auth Screen
Use the redirectToAuth(show?: "signin" | "signup")
function to redirect the user to the full page auth screen provided by SuperTokens.
import { redirectToAuth } from "supertokens-auth-react/recipe/emailpassword";
function NavBar () {
function async onLogin () {
redirectToAuth();
// call redirectToAuth("signin") to take them to the sign in screen
// call redirectToAuth("signup") to take them to the sign up screen
}
return (
<ul>
<li>Home</li>
<li onClick={onLogin}>Login</li>
</ul>
)
}