49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
export const metadata = {
|
||
title: `Auth Providers`,
|
||
}
|
||
|
||
# {metadata.title}
|
||
|
||
In this document, you’ll learn how the Auth Module handles authentication using providers.
|
||
|
||
## What's an Auth Provider Module?
|
||
|
||
An auth provider module handles authenticating customers and users, either using custom logic or by integrating a third-party service.
|
||
|
||
For example, the EmailPass Auth Provider Module authenticates a user using their email and password, whereas the Google Auth Provider Module authenticates users using their Google account.
|
||
|
||
<Note type="check">
|
||
|
||
Support for the Google Auth Provider Module is coming soon.
|
||
|
||
</Note>
|
||
|
||
---
|
||
|
||
## Configure Auth Provider Modules
|
||
|
||
By default, admin users and customers can login with all installed auth provider moduless.
|
||
|
||
To limit the auth providers that used for admin users and customers, use the [authMethodsPerActor option](/references/medusa-config#http-authMethodsPerActor-1-3) in Medusa's configurations:
|
||
|
||
```js title="medusa-config.js"
|
||
module.exports = {
|
||
projectConfig: {
|
||
http: {
|
||
authMethodsPerActor: {
|
||
user: ["google"],
|
||
customer: ["emailpass"]
|
||
},
|
||
// ...
|
||
},
|
||
// ...
|
||
}
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## How to Create an Auth Provider Module
|
||
|
||
Refer to [this guide](/references/auth/provider) to learn how to create an auth provider module.
|