Skip to content

Commit

Permalink
fix(server): Allow same user to be logged in concurrently
Browse files Browse the repository at this point in the history
Relates to #53
  • Loading branch information
michaelbromley committed Mar 14, 2019
1 parent 40516c2 commit 80d09d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vendure/core",
"version": "0.1.0-alpha.14",
"version": "0.1.0-alpha.15",
"description": "A modern, headless ecommerce framework",
"repository": {
"type": "git",
Expand Down
7 changes: 6 additions & 1 deletion server/src/service/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ export class AuthService {
if (this.configService.authOptions.requireVerification && !user.verified) {
throw new NotVerifiedError();
}
await this.deleteSessionsByUser(user);
// TODO: this line is commented out so that the same user may be logged
// in more than once concurrently. At this time, it is needed in order
// for the online demo to work properly, but it may be desirable to keep it
// this way by design. See https://github.com/vendure-ecommerce/vendure/issues/53
// await this.deleteSessionsByUser(user);

if (ctx.session && ctx.session.activeOrder) {
await this.deleteSessionsByActiveOrder(ctx.session && ctx.session.activeOrder);
}
Expand Down

0 comments on commit 80d09d8

Please sign in to comment.