Totomakers
11/10/2023, 3:43 PM@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 || '/');
}
And i redirect to my frontend, the
const session = useSessionContext()
Doesn't have my impersonationId
- when i look at my sAccessToken
i have the right value - but look like the context read from sFrontend
rp_st
11/10/2023, 3:47 PMrp_st
11/10/2023, 3:47 PMTotomakers
11/10/2023, 3:49 PMrp_st
11/10/2023, 3:51 PMTotomakers
11/10/2023, 3:54 PMrp_st
11/10/2023, 4:00 PM