unauthenticate
Logs out the current user and sets the values on the current user object to null.
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.unauthenticate()
Or import directly the specific function:
_10import { unauthenticate } from "@onflow/fcl"_10_10unauthenticate()
Usage
_10import * as fcl from '@onflow/fcl';_10fcl.config().put('accessNode.api', 'https://rest-testnet.onflow.org');_10// first authenticate to set current user_10fcl.authenticate();_10// ... somewhere else & sometime later_10fcl.unauthenticate();_10// fcl.currentUser.loggedIn === null
Returns
void