The LensClient exposes some authentication helpers to aid in building your applications.
These helpers do not map directly to queries or mutations exposed by the GraphQL API but instead leverage the cache/storage used in the LensClient.
Check whether the instance of LensClient is in an authenticated state.
const isAuthenticated = await client.authentication.isAuthenticated();
Get the access token for the currently authenticated profile.
const accessTokenResult = await client.authentication.getAccessToken(); const accessToken = accessTokenResult.unwrap();
Get the profileId of currently authenticated profile.
const profileId = await client.authentication.getProfileId();
Updated about 1 month ago