Feat(authentication): Load auth providers (#6023)
* initial providers loader implementation * registerAdd providers * remove comment * remove comment
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default as UsernamePasswordProvider } from "./username-password"
|
||||
@@ -0,0 +1,21 @@
|
||||
import { AuthUserService } from "@services"
|
||||
import { AbstractAuthenticationModuleProvider } from "@medusajs/types"
|
||||
|
||||
class UsernamePasswordProvider extends AbstractAuthenticationModuleProvider {
|
||||
public static PROVIDER = "usernamePassword"
|
||||
public static DISPLAY_NAME = "Username/Password Authentication"
|
||||
|
||||
protected readonly authUserSerivce_: AuthUserService
|
||||
|
||||
constructor({ authUserService: AuthUserService }) {
|
||||
super()
|
||||
|
||||
this.authUserSerivce_ = AuthUserService
|
||||
}
|
||||
|
||||
async authenticate(userData: Record<string, unknown>) {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
export default UsernamePasswordProvider
|
||||
Reference in New Issue
Block a user