Skip to main content

refresh

Update user tokens

AuthProvider.refresh(marker, token)

const value = await AuthProvider.refresh('email', '1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9')
Schema

marker:* string
The text identifier of the authorization provider. Example - email
example: email

token:* string
Refresh token
example: 1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9

This method updates the user's token. Returns an object with a set of tokens.

Example return:

{
"userIdentifier": "example@oneentry.cloud",
"authProviderIdentifier": "email",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8",
"refreshToken": "1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9"
}
Schema

userIdentifier: string
user identifier example: example@oneentry.cloud

authProviderIdentifier: string
auth provider identifier
example: email

accessToken: string
access token
example:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJQb3N0bWFuUnVudGltZS83LjM3LjMiLCJpYXQiOjE3MTQ1NTc2NzAsImV4cCI6MTcxNDU2MTI3MH0.vm74Ha-S37462CAF3QiDpO9b0OhlJFNDMKq4eEyoaB8

refreshToken: string
refresh token
example: 1714557670334-cb85112d-618d-4b2a-bad5-137b19c135b9