We are sending firebase email verification link to user. After clicking on that, we have created custom page to verify the user.
All is working fine till now.
Now, after verify email, we are in logged out mode and we want to call the custom API with firebase ID and token.
We have OOBCODE in url, So can we get the firebase uid and token using OOBCODE?
Below is the code:
if(router.query.oobCode)
{
firebase.auth().applyActionCode(router.query.oobCode)
.then((res) => {
setValidCode(true)
setVerifiedCode(true)
},
error =>
{
setError(error.message)
setValidCode(false)
setVerifiedCode(true)
});
}