[NEW] Service account one-tap login#7
Merged
kb0304 merged 12 commits intoservice-accountsfrom Jun 27, 2019
Merged
Conversation
kb0304
reviewed
Jun 25, 2019
| this.tryEnsureIndex({ type: 1 }); | ||
| this.tryEnsureIndex({ 'visitorEmails.address': 1 }); | ||
| this.tryEnsureIndex({ federation: 1 }, { sparse: true }); | ||
| this.tryEnsureIndex({ 'u._id': 1 }); |
kb0304
reviewed
Jun 25, 2019
| if (Meteor.user().u) { | ||
| username = Meteor.user().u.username; | ||
| } | ||
| console.log(username); |
Collaborator
There was a problem hiding this comment.
Remove the log statement. Isn't the lint test supposed to give error on log statements?
Owner
Author
There was a problem hiding this comment.
Yes, it should, I will update this.
| import { Users } from '../../../models'; | ||
|
|
||
| Meteor.methods({ | ||
| getLoginToken(username) { |
Collaborator
There was a problem hiding this comment.
What about the case when the user corresponding to neither Meteor.userId and nor username has a .u property?
Owner
Author
There was a problem hiding this comment.
Ohh yes, I need to throw an error for that.
Collaborator
There was a problem hiding this comment.
Due to high security concerns in this method, I'd recommend structuring it like.. for the case we want to return, generate and return.. for everything else raise Error
kb0304
approved these changes
Jun 27, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request needs to be reviewed after the callbacks one.