jj_9475
03/31/2022, 11:52 AMrp_st
03/31/2022, 11:54 AMrp_st
03/31/2022, 11:56 AMrp_st
03/31/2022, 11:58 AMrp_st
03/31/2022, 11:59 AMrp_st
03/31/2022, 3:28 PMts
EmailPassword.init({
override: {
components: {
EmailPasswordSignInHeader_Override: ({DefaultComponent, ...props}) => {
return (
<div>
<DefaultComponent {...props}/>
<CustomErrorMessage />
</div>
);
}
}
}
})
And there is also EmailPasswordSignUp_Override
for sign up header.
You will have to make CustomErrorMessage
such that it listens to a custom even to show the error message you want to show.
The custom even can be fired like this:
ts
EmailPassword.init({
override: {
functions: (oI) => {
return {
...oI,
signIn: async function (input) {
// make call to backend and if you have your custom error, then fire event
// to show the error in the UI
// You need to return from this function as per this function's return type
}
}
}
}
})
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by