Sign-in & sign-out with NearFi
Request NearFi user wallet to sign-in your application
Signing in
Once NearFi wallet object is available (see here), it is recommended for applications to request approval from users to sign-in the applications. Example code to request sign-in:
The response of requestSignIn
function also has an access key information. More details on the response can be found here.
Once successfully signed in, function window.nearFiWallet.isSignedIn()
will return true
.
Signing out
API signOut
serve the function of singing out when a user wants to disconnect the wallet from the applications.
Last updated