React Hooks
useAuthenticationMethod
The useAuthenticationMethod
hook is designed to retrieve the user's authentication method from their session. This hook is particularly useful when you need to determine how a user authenticated, whether via email, Google, Facebook, etc.
Example
Return Type
The returned object can have different structures based on the authentication method used:
For 'fv:email', it includes the method and email:
For 'fv:google' and 'fv:facebook', it includes the method and email:
For 'wagmi', it includes the method and EOA (Ethereum address):
For 'xaman', it includes the method and rAddress:
Last updated