|
1
|
post: |
|
2
|
operationId: PostAdminAuthTokenRefresh |
|
3
|
summary: Refresh Authentication Token |
|
4
|
description: >- |
|
5
|
Refresh the authentication token of a user. This is useful after |
|
6
|
authenticating a user with a third-party service to ensure the token holds |
|
7
|
the new user's details, or when you don't want users to re-login every day. |
|
8
|
externalDocs: |
|
9
|
url: >- |
|
10
|
https://docs.medusajs.com/resources/commerce-modules/auth/authentication-route#2-third-party-service-authenticate-flow |
|
11
|
description: Learn about third-party authentication flow. |
|
12
|
x-authenticated: true |
|
13
|
x-codeSamples: |
|
14
|
- lang: JavaScript |
|
15
|
label: JS SDK |
|
16
|
source: |
|
17
|
$ref: ../code_samples/JavaScript/auth_token_refresh/post.js |
|
18
|
- lang: Shell |
|
19
|
label: cURL |
|
20
|
source: |
|
21
|
$ref: ../code_samples/Shell/auth_token_refresh/post.sh |
|
22
|
tags: |
|
23
|
- Auth |
|
24
|
responses: |
|
25
|
'200': |
|
26
|
description: OK |
|
27
|
content: |
|
28
|
application/json: |
|
29
|
schema: |
|
30
|
$ref: ../components/schemas/AuthResponse.yaml |
|
31
|
'400': |
|
32
|
$ref: ../components/responses/400_error.yaml |
|
33
|
'401': |
|
34
|
$ref: ../components/responses/unauthorized.yaml |
|
35
|
'404': |
|
36
|
$ref: ../components/responses/not_found_error.yaml |
|
37
|
'409': |
|
38
|
$ref: ../components/responses/invalid_state_error.yaml |
|
39
|
'422': |
|
40
|
$ref: ../components/responses/invalid_request_error.yaml |
|
41
|
'500': |
|
42
|
$ref: ../components/responses/500_error.yaml |