Skip to content

Conversation

mihaiandrei97
Copy link

No description provided.

@avevotsira
Copy link

Look good to me so far 👍

export const inactivityTimeoutSeconds = 60 * 60 * 24 * 10; // 10 days
const activityCheckIntervalSeconds = 60 * 60; // 1 hour

export async function validateSessionToken(token: string): Promise<Session | null> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you keep validateSessionToken() to have the type signature:

function validateSessionToken(token: string): SessionValidationResult

const session: Session = {
id: row.string(0),
userId: row.number(1),
expiresAt: new Date(row.number(2) * 1000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can keep the expiresAt property so we don't have to keep using inactivityTimeoutSeconds.

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.

3 participants