mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Fix tests
This commit is contained in:
parent
65a5bbf422
commit
0a9d43a99e
@ -200,7 +200,7 @@ export namespace Auth {
|
||||
"iat": expect.any(Number),
|
||||
"iss": expectedIssuer,
|
||||
"refreshTokenId": expect.any(String),
|
||||
"aud": expect.any(String),
|
||||
"aud": backendContext.value.projectKeys === "no-project" ? expect.any(String) : backendContext.value.projectKeys.projectId,
|
||||
"sub": expect.any(String),
|
||||
"role": "authenticated",
|
||||
"branchId": "main",
|
||||
@ -410,23 +410,6 @@ export namespace Auth {
|
||||
headers: expect.anything(),
|
||||
});
|
||||
|
||||
const accessToken = response.body.access_token;
|
||||
const decodedAccessToken = jose.decodeJwt(accessToken);
|
||||
expect(decodedAccessToken).toEqual({
|
||||
"exp": expect.any(Number),
|
||||
"iat": expect.any(Number),
|
||||
"iss": `http://localhost:8102/api/v1/projects/${projectKeys.projectId}`,
|
||||
"refreshTokenId": expect.any(String),
|
||||
"aud": expect.any(String),
|
||||
"sub": expect.any(String),
|
||||
"role": "authenticated",
|
||||
"branchId": "main",
|
||||
"displayName": expect.toSatisfy(() => true),
|
||||
"primaryEmail": backendContext.value.mailbox.emailAddress,
|
||||
"primaryEmailVerified": true,
|
||||
"selectedTeamId": expect.toSatisfy(() => true),
|
||||
});
|
||||
|
||||
backendContext.set({
|
||||
userAuth: {
|
||||
accessToken: response.body.access_token,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user