feat: Move userpass default definition to defineConfig instead of a hard-coded value (#8557)
This commit is contained in:
1 parent
fc439a32f1
commit
a013c4edc5
7 files changed
+76
-21
No files matched your search
@@ -44,7 +44,6 @@
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@medusajs/auth-emailpass": "0.0.1",
|
||||
"@medusajs/modules-sdk": "^1.12.9",
|
||||
"@medusajs/utils": "^1.11.7",
|
||||
"@mikro-orm/core": "5.9.7",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import EmailPassProvider from "@medusajs/auth-emailpass"
|
||||
|
||||
import { LoaderOptions, ModulesSdkTypes, ModuleProvider } from "@medusajs/types"
|
||||
import { Lifetime, asFunction, asValue } from "awilix"
|
||||
import { moduleProviderLoader } from "@medusajs/modules-sdk"
|
||||
@@ -33,18 +31,9 @@ export default async ({
|
||||
| ModulesSdkTypes.ModuleServiceInitializeCustomDataLayerOptions
|
||||
) & { providers: ModuleProvider[] }
|
||||
>): Promise<void> => {
|
||||
// Note: For now we want to inject some providers out of the box
|
||||
const providerConfig = [
|
||||
{
|
||||
resolve: EmailPassProvider,
|
||||
id: "emailpass",
|
||||
},
|
||||
...(options?.providers ?? []),
|
||||
]
|
||||
|
||||
await moduleProviderLoader({
|
||||
container,
|
||||
providers: providerConfig,
|
||||
providers: options?.providers || [],
|
||||
registerServiceFn: registrationFn,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user