docs: update imports and package names across docs (#9375)

* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
This commit is contained in:
Shahed Nasser
2024-10-01 11:03:42 +02:00
committed by GitHub
parent c726ed54f5
commit 2e16949979
196 changed files with 1379 additions and 1491 deletions
@@ -12,26 +12,26 @@ Using the Emailpass auth module provider, you allow users to register and login
---
## Install the Emailpass Auth Module Provider
## Register the Emailpass Auth Module Provider
The Emailpass auth provider is registered by default with the Auth Module.
If you want to pass options to the provider, add the provider to the `providers` option of the Auth Module:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/utils")
const { Modules } = require("@medusajs/framework/utils")
// ...
const modules = {
// ...
[Modules.AUTH]: {
resolve: "@medusajs/auth",
resolve: "@medusajs/medusa/auth",
options: {
providers: [
// other providers...
{
resolve: "@medusajs/auth-emailpass",
resolve: "@medusajs/medusa/auth-emailpass",
id: "emailpass",
options: {
// options...
@@ -18,7 +18,7 @@ Learn about the authentication flow in [this guide](../../authentication-route/p
---
## Install the Github Auth Module Provider
## Register the Github Auth Module Provider
<Prerequisites
items={[
@@ -33,28 +33,22 @@ Learn about the authentication flow in [this guide](../../authentication-route/p
]}
/>
To install the GitHub auth module provider, run the following command in the directory of your Medusa application:
```bash npm2yarn
npm install @medusajs/auth-github@preview
```
Next, add the module to the array of providers passed to the Auth Module:
Add the module to the array of providers passed to the Auth Module:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/utils")
const { Modules } = require("@medusajs/framework/utils")
// ...
const modules = {
// ...
[Modules.AUTH]: {
resolve: "@medusajs/auth",
resolve: "@medusajs/medusa/auth",
options: {
providers: [
// other providers...
{
resolve: "@medusajs/auth-github",
resolve: "@medusajs/medusa/auth-github",
id: "github",
options: {
clientId: process.env.GITHUB_CLIENT_ID,
@@ -18,7 +18,7 @@ Learn about the authentication flow in [this guide](../../authentication-route/p
---
## Install the Google Auth Module Provider
## Register the Google Auth Module Provider
<Prerequisites
items={[
@@ -33,28 +33,22 @@ Learn about the authentication flow in [this guide](../../authentication-route/p
]}
/>
To install the Google auth module provider, run the following command in the directory of your Medusa application:
```bash npm2yarn
npm install @medusajs/auth-google@preview
```
Next, add the module to the array of providers passed to the Auth Module:
Add the module to the array of providers passed to the Auth Module:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/utils")
const { Modules } = require("@medusajs/framework/utils")
// ...
const modules = {
// ...
[Modules.AUTH]: {
resolve: "@medusajs/auth",
resolve: "@medusajs/medusa/auth",
options: {
providers: [
// other providers...
{
resolve: "@medusajs/auth-google",
resolve: "@medusajs/medusa/auth-google",
id: "google",
options: {
clientId: process.env.GOOGLE_CLIENT_ID,