Skip to main content

@authgear/capacitor / TransientTokenStorage

Class: TransientTokenStorage

TransientTokenStorage stores the refresh token in memory. The refresh token is forgotten as soon as the user quits the app, or the app was killed by the system. When the app launches again next time, no refresh token is found. The user is considered unauthenticated. This implies the user needs to authenticate over again on every app launch.

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new TransientTokenStorage(): TransientTokenStorage

Returns

TransientTokenStorage

Defined in

packages/authgear-capacitor/index.d.ts:327

Methods

delRefreshToken

delRefreshToken(namespace): Promise<void>

Deletes the refresh token for the specified namespace in the storage.

Parameters

NameType
namespacestring

Returns

Promise<void>

Implementation of

TokenStorage.delRefreshToken

Defined in

packages/authgear-capacitor/index.d.ts:330


getRefreshToken

getRefreshToken(namespace): Promise<null | string>

Retrieves the refresh token associated with a specific namespace in the storage.

Parameters

NameType
namespacestring

Returns

Promise<null | string>

Implementation of

TokenStorage.getRefreshToken

Defined in

packages/authgear-capacitor/index.d.ts:329


setRefreshToken

setRefreshToken(namespace, refreshToken): Promise<void>

Stores a refresh token for a give namespace to the storage.

Parameters

NameType
namespacestring
refreshTokenstring

Returns

Promise<void>

Implementation of

TokenStorage.setRefreshToken

Defined in

packages/authgear-capacitor/index.d.ts:328