docs: fixes and changes based on latest updates (#7322)

* docs: changes based on DX changes

* remove fields no longer needed

* remove unnecessary parameters

* fixes to authenticate middleware usage

* add highlight to migrations config

* change configuration to http

* added missing remote link docs

* fix name in sidebar

* added notification module docs + updated file module docs

* add vale exceptions

* fix vale errors

* added docs on custom cli scripts
This commit is contained in:
Shahed Nasser
2024-05-22 13:37:48 +03:00
committed by GitHub
parent ff5d573887
commit 154673f3d8
55 changed files with 1674 additions and 3791 deletions
@@ -55,9 +55,9 @@ This example uses the [jsonwebtoken NPM package](https://www.npmjs.com/package/j
return
}
const { jwt_secret } =
req.scope.resolve("configModule").projectConfig
const token = jwt.sign(authUser, jwt_secret)
const { jwtSecret } =
req.scope.resolve("configModule").projectConfig.http
const token = jwt.sign(authUser, jwtSecret)
res.status(200).json({ token })
}
@@ -153,9 +153,9 @@ This example uses the [jsonwebtoken NPM package](https://www.npmjs.com/package/j
throw new MedusaError(MedusaError.Types.UNAUTHORIZED, error)
}
const { jwt_secret } =
req.scope.resolve("configModule").projectConfig
const token = jwt.sign(authUser, jwt_secret)
const { jwtSecret } =
req.scope.resolve("configModule").projectConfig.http
const token = jwt.sign(authUser, jwtSecret)
if (successRedirectUrl) {
const url = new URL(successRedirectUrl!)
@@ -227,6 +227,6 @@ GOOGLE_SUCCESS_REDIRECT_URL=<YOUR_GOOGLE_SUCCESS_REDIRECT_URL>
## Auth CORS
The Medusa application's authentication API routes are defined under the `/auth` prefix that requires setting the `auth_cors` configuration. So, before using these routes, make sure to set that configuration.
The Medusa application's authentication API routes are defined under the `/auth` prefix that requires setting the `authCors` property of the `http` configuration. So, before using these routes, make sure to set that configuration.
Refer to [Medusa's configuration guide](/references/medusa-config#auth_cors) for more details.
Refer to [Medusa's configuration guide](/references/medusa-config#authCors) for more details.
@@ -45,10 +45,10 @@ const {
// ...
const {
jwt_secret,
} = req.scope.resolve("configModule").projectConfig
jwtSecret,
} = req.scope.resolve("configModule").projectConfig.http
const token = jwt.sign(authUser, jwt_secret)
const token = jwt.sign(authUser, jwtSecret)
```
Then, the token is passed in the header of subsequent requests in the Authorization Bearer header.