Skip to main content

@authgear/capacitor / TokenStorage

Interface: TokenStorage

TokenStorage is an interface controlling when refresh tokens are stored. Normally you do not need to implement this interface. You can use one of those implementations provided by the SDK.

Implemented by

Table of contents

Methods

Methods

delRefreshToken

delRefreshToken(namespace): Promise<void>

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

Parameters

NameType
namespacestring

Returns

Promise<void>

Defined in

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


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>

Defined in

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


setRefreshToken

setRefreshToken(namespace, refreshToken): Promise<void>

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

Parameters

NameType
namespacestring
refreshTokenstring

Returns

Promise<void>

Defined in

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