NativeAuthenticationStrategy
NativeAuthenticationStrategy
This strategy implements a username/password credential-based authentication, with the credentials being stored in the Vendure database. This is the default method of authentication, and it is advised to keep it configured unless there is a specific reason not to.
Signature
class NativeAuthenticationStrategy implements AuthenticationStrategy<NativeAuthenticationData> {
    readonly name = NATIVE_AUTH_STRATEGY_NAME;
    init(injector: Injector) => ;
    defineInputType() => DocumentNode;
    authenticate(ctx: RequestContext, data: NativeAuthenticationData) => Promise<User | false>;
    verifyUserPassword(ctx: RequestContext, userId: ID, password: string) => Promise<boolean>;
}
- Implements: AuthenticationStrategy<NativeAuthenticationData>
name
property
init
method
(injector: Injector) => defineInputType
method
() => DocumentNodeauthenticate
method
(ctx: RequestContext, data: NativeAuthenticationData) => Promise<User | false>verifyUserPassword
method
(ctx: RequestContext, userId: ID, password: string) => Promise<boolean>