Skip to main content

PersistentTokenStorage

@authgear/react-native / PersistentTokenStorage

Class: PersistentTokenStorage

PersistentTokenStorage stores the refresh token in a persistent storage. When the app launches again next time, the refresh token is loaded from the persistent storage. The user is considered authenticated as long as the refresh token is found. However, the validity of the refresh token is not guaranteed. You must call fetchUserInfo to ensure the refresh token is still valid.

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new PersistentTokenStorage()

Defined in

packages/authgear-react-native/index.d.ts:603

Methods

delRefreshToken

delRefreshToken(namespace): Promise<void>

Parameters

NameType
namespacestring

Returns

Promise<void>

Implementation of

TokenStorage.delRefreshToken

Defined in

packages/authgear-react-native/index.d.ts:606


getRefreshToken

getRefreshToken(namespace): Promise<null | string>

Parameters

NameType
namespacestring

Returns

Promise<null | string>

Implementation of

TokenStorage.getRefreshToken

Defined in

packages/authgear-react-native/index.d.ts:605


setRefreshToken

setRefreshToken(namespace, refreshToken): Promise<void>

Parameters

NameType
namespacestring
refreshTokenstring

Returns

Promise<void>

Implementation of

TokenStorage.setRefreshToken

Defined in

packages/authgear-react-native/index.d.ts:604