-
Notifications
You must be signed in to change notification settings - Fork 1
feat: adds test to check session cookie setting and timezone #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.1
Are you sure you want to change the base?
Conversation
@@ -273,6 +273,28 @@ export const SessionMock: Partial<typeof Session> = { | |||
}); | |||
return deserializeSession(response); | |||
}, | |||
createNewSession: async ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I use the createNewSessionWithoutRequestResponse
method that's already present, I don't see any set-cookie headers - possibly since there is no req/res object to add headers to
The session object has the expiry as a number, but we're concerned about the timezone that's sent in the header
refreshToken: {
createdTime: 1749703674308,
expiry: 1758343674308,
token: '...'
},
vs
Expires=Fri, 12 Jun 2026 05:10:37 GMT
const signUp = async (tenantId, email, password, session, userContext) => { | ||
const { response } = await queryAPI({ | ||
method: "post", | ||
path: "/test/emailpassword/signup", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why isn't this calling the normal signup api? ( "/auth/signup"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe both are equivalent for this test. Both will internally call the recipe signup.
I can change it to the /auth/signup
API
}; | ||
}; | ||
|
||
const createNewSession = async ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this.
Uh oh!
There was an error while loading. Please reload this page.