Magic Link Expired Message on UI
While logging in with magic link magic-sdk v6.1.0 ,v8.1.0, I immediately receive magic link expired error. Sometimes it happens even though I have not clicked on the link.
I have tested with node version 12 and 16
This is my login code implementation for magic login function
const magic = useMagicLogin()
magic.auth
.loginWithMagicLink({ email: emailAddress })
.then((res) => {
checkLoginStatus()
})
.catch((err: any) => {
callback(err?.message)
})
This is my implementation for useMagicLogin Hook
const rpcUrl = getRpcUrl()
const chainId = parseInt(process.env.REACT_APP_CHAIN_ID)
const BSCOptions = {
rpcUrl, // Smart Chain RPC URL
chainId, // Smart Chain chain id
}
const magic = new Magic('pk_********', { network: BSCOptions })
return magic
}