Contains methods relating to Session, AuthenticatedSession & AnonymousSession entities.
(ctx: RequestContext, apiType: ApiType, authenticationMethod: string, authenticationData: any) => Promise<AuthenticatedSession | InvalidCredentialsError | NotVerifiedError>Authenticates a user's credentials and if okay, creates a new AuthenticatedSession.
(ctx: RequestContext, user: User, authenticationStrategyName: string, apiType?: ApiType) => Promise<AuthenticatedSession | NotVerifiedError>Creates a new AuthenticatedSession for the given User.
The apiType argument is passed through to SessionService.createNewAuthenticatedSession(),
whose docs describe when to pass it.
(ctx: RequestContext, userId: ID, password: string) => Promise<boolean | InvalidCredentialsError | ShopInvalidCredentialsError>Verify the provided password against the one we have for the given user. Requires the NativeAuthenticationStrategy to be configured.
(ctx: RequestContext, sessionToken: string) => Promise<void>Deletes all sessions for the user associated with the given session token.
Architecture reviews, custom plugin work, migrations, ongoing support. Get a hand from the team that builds Vendure.
Talk to the team