Skip to content

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

Open
wants to merge 2 commits into
base: 4.1
Choose a base branch
from

Conversation

namsnath
Copy link

@namsnath namsnath commented Jun 11, 2025

@@ -273,6 +273,28 @@ export const SessionMock: Partial<typeof Session> = {
});
return deserializeSession(response);
},
createNewSession: async (
Copy link
Collaborator

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.

Copy link
Author

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",
Copy link
Collaborator

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")

Copy link
Author

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 (
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants