-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Sessions and user info #45
Conversation
} | ||
} | ||
async resumeSession(accessToken: string): Promise<UserObjectType> { | ||
const session : UserObjectType = await this.findSessionByAccessToken(accessToken); |
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.
SessionType instead of SessionType
}); | ||
} | ||
} | ||
async resumeSession(accessToken: string): Promise<UserObjectType> { |
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.
?UserObjectType could return null
}); | ||
} | ||
await this.db.invalidateSession(session.sessionId); | ||
} else { // eslint-disable-line no-else-return |
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.
Should we delete the invalid session if it's not longer valid ?
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 think the lifespan of expired sessions should be configurable. It can provide a useful log for user account activity. Keep the latest 10 sessions for example.
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'll create an issue for this.
@pradel Updated. |
Thanks! |
Update dependency @types/jest to v22
Update dependency @types/jest to v22
This PR introduces a variety of improvements to the user session code and also adds support for user profiles.