Totomakers
@UseGuards(AuthUserRolesGuard) @AuthUserRoles([UserRole.Admin]) @Get('/take/:id') public async take( @Req() req: FastifyRequest, @Response() resp: FastifyReply, @Param('id') id: string, @SupertokensSession() session: SessionContainer, ) { const user = await this.findOneOrFail(id); await session.mergeIntoAccessTokenPayload({ impersonationId: user.id, }); return resp .status(302) .redirect(this._supertokensConfig.appInfo.websiteDomain || '/'); }
const session = useSessionContext()
impersonationId
sAccessToken
sFrontend
rp_st
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).