Skip to main content

refresh

Update user tokens.

AuthProvider?.refresh( marker?, token? );

Minimal example

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

marker(required): string
The text identifier of the authorization provider
example: "email"

token(required): string
Refresh token
example: "abcdef123456"

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

Example response

{
"userIdentifier": "test@test.ru",
"authProviderIdentifier": "email",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6OCwiYXV0aFByb3ZpZGVySWRlbnRpZmllciI6ImVtYWlsIiwidXNlcklkZW50aWZpZXIiOiJ0ZXN0QHRlc3QucnUiLCJ1c2VyQWdlbnQiOiJub2RlIiwiaWF0IjoxNzUzMDkwODA0LCJleHAiOjE3NTMxMjY4MDR9.YXsaKNz0-Q9WwP-pYUKesRVcGj2IrtUNsjCsC6jf5Os",
"refreshToken": "1753090804346-336d3731-153c-4156-b194-2b877d3524cc"
}
Schema

userIdentifier: string
The unique identifier for the user.
example: "user12345"

authProviderIdentifier: string
The identifier for the authentication provider.
example: "email"

accessToken: string
The access token for the user session.
example: "abcdef123456"

refreshToken: string
The refresh token for renewing the access token.
example: "ghijkl789012"