Skip to content
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

Merged
merged 6 commits into from
Jan 31, 2017
Merged

Sessions and user info #45

merged 6 commits into from
Jan 31, 2017

Conversation

TimMikeladze
Copy link
Member

This PR introduces a variety of improvements to the user session code and also adds support for user profiles.

}
}
async resumeSession(accessToken: string): Promise<UserObjectType> {
const session : UserObjectType = await this.findSessionByAccessToken(accessToken);
Copy link
Member

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> {
Copy link
Member

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
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member Author

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.

@TimMikeladze
Copy link
Member Author

@pradel Updated.

@TimMikeladze TimMikeladze merged commit 9948d8f into master Jan 31, 2017
@TimMikeladze
Copy link
Member Author

Thanks!

@pradel pradel deleted the resume-session branch July 13, 2017 13:48
Aetherall pushed a commit that referenced this pull request Mar 11, 2018
Update dependency @types/jest to v22
Aetherall pushed a commit that referenced this pull request Mar 13, 2018
Update dependency @types/jest to v22
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