Hi Anyone have an idea why when i use: ``` @U...
# support-questions-legacy
t
Hi Anyone have an idea why when i use:
Copy code
@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
Copy code
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
r
Hey. It’s case you need to return a 200 to the frontend and then redirect from the frontend.
Make sure that this api call is being made using our interceptors
t
I use a a href but i can make it an api call if it's better
r
Yup. You will have to. Otherwise the front token won’t be updated
t
Perfect 🔥 It's work \o/ you are the goat ❤️
r
👍