PersistentTokenStorage
@authgear/capacitor / 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-capacitor/index.d.ts:768
Methods
delRefreshToken
▸ delRefreshToken(namespace
): Promise
<void
>
Parameters
Name | Type |
---|---|
namespace | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/authgear-capacitor/index.d.ts:771
getRefreshToken
▸ getRefreshToken(namespace
): Promise
<null
| string
>
Parameters
Name | Type |
---|---|
namespace | string |
Returns
Promise
<null
| string
>
Implementation of
Defined in
packages/authgear-capacitor/index.d.ts:770
setRefreshToken
▸ setRefreshToken(namespace
, refreshToken
): Promise
<void
>
Parameters
Name | Type |
---|---|
namespace | string |
refreshToken | string |
Returns
Promise
<void
>
Implementation of
Defined in
packages/authgear-capacitor/index.d.ts:769