TransientTokenStorage
@authgear/react-native / 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
Constructors
Constructor
new TransientTokenStorage():
TransientTokenStorage
Returns
TransientTokenStorage
Methods
delRefreshToken()
delRefreshToken(
namespace):Promise<void>
Deletes the refresh token for the specified namespace in the storage.
Parameters
namespace
string
Returns
Promise<void>
Implementation of
getRefreshToken()
getRefreshToken(
namespace):Promise<string|null>
Retrieves the refresh token associated with a specific namespace in the storage.
Parameters
namespace
string
Returns
Promise<string | null>
Implementation of
setRefreshToken()
setRefreshToken(
namespace,refreshToken):Promise<void>
Stores a refresh token for a give namespace to the storage.
Parameters
namespace
string
refreshToken
string
Returns
Promise<void>