@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
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
Name | Type |
---|---|
namespace | string |
Returns
Promise
<void
>
Implementation of
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
Name | Type |
---|---|
namespace | string |
Returns
Promise
<null
| string
>
Implementation of
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
Name | Type |
---|---|
namespace | string |
refreshToken | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/authgear-capacitor/index.d.ts:328