reauthenticate
A convenience method that calls fcl.unauthenticate()
and then fcl.authenticate()
for the current user.
This method can only be used in web browsers.
The current user must be authenticated first.
Import
You can import the entire package and access the function:
_10import * as fcl from "@onflow/fcl"_10_10fcl.reauthenticate(opts)
Or import directly the specific function:
_10import { reauthenticate } from "@onflow/fcl"_10_10reauthenticate(opts)
Usage
_10import * as fcl from '@onflow/fcl';_10// first authenticate to set current user_10fcl.authenticate();_10// ... somewhere else & sometime later_10fcl.reauthenticate();_10// logs out user and opens up login/sign-up flow
Parameters
opts
(optional)
- Type:
{}
- Description: Authentication options passed to authenticate method
Returns
Promise that resolves to the authenticated CurrentUser object or undefined