docs: updates following authentication flow changes (#8706)
* docs: updates following authentication flow changes * generate sidebar * added open api specs * fix up OAS * changes to existing pages * change sidebar items * update marketplace recipe
This commit is contained in:
@@ -34,7 +34,7 @@ All API Routes are prefixed with `/admin`. So, during development, the API Route
|
||||
|
||||
## Authentication
|
||||
|
||||
There are three ways to send authenticated requests to the Medusa server: Using an admin user's API token, using a JWT token in a bearer authorization header, or using a cookie session ID.
|
||||
There are three ways to send authenticated requests to the Medusa server: Using a JWT token in a bearer authorization header, using an admin user's API token, or using a cookie session ID.
|
||||
|
||||
### Bearer Authorization with JWT Tokens
|
||||
|
||||
@@ -42,8 +42,6 @@ Use a JWT token in a request's bearer authorization header to send authenticated
|
||||
|
||||
#### How to Obtain the JWT Token
|
||||
|
||||
{/* TODO add correct link to auth route */}
|
||||
|
||||
JWT tokens are obtained by sending a request to the authentication route passing it the user's email and password in the request body.
|
||||
|
||||
For example:
|
||||
@@ -59,6 +57,8 @@ curl -X POST '{backend_url}/auth/user/emailpass' \
|
||||
|
||||
If authenticated successfully, an object is returned in the response with the property `token` being the JWT token.
|
||||
|
||||
Learn more about the authentication route [here](#auth_postactor_typeauth_provider)
|
||||
|
||||
#### How to Use the JWT Token
|
||||
|
||||
Pass the JWT token in the authorization bearer header:
|
||||
|
||||
@@ -43,8 +43,6 @@ Use a JWT token in a request's bearer authorization header to send authenticated
|
||||
|
||||
#### How to Obtain the JWT Token
|
||||
|
||||
{/* TODO add correct link to auth route */}
|
||||
|
||||
JWT tokens are obtained by sending a request to the authentication route passing it the customer's email and password in the request body.
|
||||
|
||||
For example:
|
||||
@@ -58,16 +56,10 @@ curl -X POST '{backend_url}/auth/customer/emailpass' \
|
||||
}'
|
||||
```
|
||||
|
||||
<Note>
|
||||
|
||||
{/* TODO add link to implementing login with google guide. */}
|
||||
|
||||
Alternatively, you can use the `google` provider instead of `emailpass`.
|
||||
|
||||
</Note>
|
||||
|
||||
If authenticated successfully, an object is returned in the response with the property `token` being the JWT token.
|
||||
|
||||
Learn more about the authentication route [here](#auth_postactor_typeauth_provider)
|
||||
|
||||
#### How to Use the JWT Token
|
||||
|
||||
Pass the JWT token in the authorization bearer header:
|
||||
|
||||
Reference in New Issue
Block a user