Function.useKeybanAuth
function useKeybanAuth(): AuthContext
Hook that provides authentication functionality using the Keyban client.
To access the Keyban service, the user must authenticate with the Keyban services. The goal is to ensure that only the user has access to their wallet. The application itself does not have direct access to the wallet unless the user authenticates. This approach enhances security by preventing unauthorized access.
This hook must be used within a KeybanProvider
component.
Returns
The Keyban authentication context.
login
: A function to log in the user, see AuthContextlogout
: A function to log out the user, see AuthContextisAuthenticated
: A boolean indicating whether the user is authenticated, see BaseAuthuser
: An object representing the user, see BaseAuthisLoading
: A boolean indicating whether the authentication status is still being determined, see BaseAuth
Throws
If the hook is used outside of a KeybanProvider
.