Skip to content

Am I impersonating? #1195

Discussion options

You must be logged in to vote

I maybe made some progress here.

Did the following on the server side:

  const currentSession = await accountsServer.findSessionByAccessToken(authToken);

Via TypeScript I get the return type of a Session:

export interface Session {
  id: string;
  userId: string;
  token: string;
  valid: boolean;
  userAgent?: string | null;
  ip?: string | null;
  createdAt: string;
  updatedAt: string;
}

When checking the currentSession, I have some additional data.
extraData is missing either in the interface or in the return type of findSessionByAccessToken.

{
  ...
  // Additional to the mentioned properties above:
  extraData: { impersonatorUserId: 'someId123321' },
}

Shall I create an issue fo…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@pradel
Comment options

@BarbecueSilver
Comment options

@BarbecueSilver
Comment options

Answer selected by pradel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants