UNPKG

@denz93/vendure-plugin-simple-auth

Version:

Allow customers login using email and verification code (One time login)

17 lines (16 loc) 765 B
import { ConfigService, ExternalAuthenticationService, RequestContext } from '@vendure/core'; import { Cache } from 'cache-manager'; import { ISimpleAuthPluginOptions } from './interfaces'; export declare class SimpleAuthService { private cache; private options; private configService; private externalAuthService; readonly prefix: string; constructor(cache: Cache, options: ISimpleAuthPluginOptions, configService: ConfigService, externalAuthService: ExternalAuthenticationService); private keyof; generateCode(email: string): Promise<string>; verifyCode(email: string, code: string): Promise<boolean>; getAllStrategyNames(): string[]; checkCrossStrategies(ctx: RequestContext, email: string): Promise<string | null>; }