Skip to main content

TransientTokenStorage

@authgear/web / 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()

Defined in

packages/authgear-web/index.d.ts:211

Methods

delRefreshToken

delRefreshToken(namespace): Promise<void>

Parameters

NameType
namespacestring

Returns

Promise<void>

Implementation of

TokenStorage.delRefreshToken

Defined in

packages/authgear-web/index.d.ts:214


getRefreshToken

getRefreshToken(namespace): Promise<null | string>

Parameters

NameType
namespacestring

Returns

Promise<null | string>

Implementation of

TokenStorage.getRefreshToken

Defined in

packages/authgear-web/index.d.ts:213


setRefreshToken

setRefreshToken(namespace, refreshToken): Promise<void>

Parameters

NameType
namespacestring
refreshTokenstring

Returns

Promise<void>

Implementation of

TokenStorage.setRefreshToken

Defined in

packages/authgear-web/index.d.ts:212