-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Fix/3451 duplicate session upon login #4337
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4337 +/- ##
==========================================
- Coverage 92.52% 92.52% -0.01%
==========================================
Files 118 118
Lines 8258 8267 +9
==========================================
+ Hits 7641 7649 +8
- Misses 617 618 +1
Continue to review full report at Codecov.
|
spec/ParseUser.spec.js
Outdated
@@ -3453,4 +3453,34 @@ describe('Parse.User testing', () => { | |||
done(); | |||
}); | |||
}); | |||
|
|||
it('does not duplicate session when loggin in multiple times #3451', (done) => { |
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.
loggin should be *logging
spec/ParseUser.spec.js
Outdated
} | ||
return Promise.all(promises); | ||
}).then(() => { | ||
// wait because session destruction is not syncrhonous |
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.
typo in syncrhonous
spec/ParseUser.spec.js
Outdated
while(promises.length != 5) { | ||
Parse.User.logIn('yolo', 'yolo') | ||
promises.push(Parse.User.logIn('yolo', 'yolo').then((res) => { | ||
// generate a new session token every times |
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.
kinda weird wording in comment but not that big of a deal
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.
👍 . The diff looks to be due to some 'now' unused code, was catching that which this is now accounting for. With that in mind I think this is good as is.
we / I need to refactor at some point UserRouter (too many things) and Session creation as spread all across the project (lot of duplicated boilerplate). |
Yeah, some consolidation is long overdue! I would be more than willing to help out with that, good amount that could be cleaned up. Lot to expect from one person ☝️. |
…y#4337) * Adds failing test for parse-community#3451 (on multiple logins) * Factor sessionDestruction as part of Session creation flow in RestWrite * nits
No description provided.