-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
[NEW] create a method 'create token' #6807
Conversation
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.
How exactly would this token be used? Can it be used for the rest api? Can it be used to automatically log in a user on the website?
@@ -0,0 +1,13 @@ | |||
Meteor.methods({ | |||
createToken({user}) { |
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.
Change this parameter to only show which properties of the user you need. This way the clients calling this real-time method don't need to pass the full user object which in turn makes transmission over the wire faster.
@graywolf336 I think @rodrigok have a better answer. But I believe the case is a service/integration that uses the API, but we don't want to save passwords to get the token. |
Okay. We've had a lot of people expecting the login via the rest api actually logging them into the website, which is why I was asking |
@RocketChat/core this is a huge security flaw! How's this been approved? So an admin can now create a token for any user and login as them? |
@RocketChat/core
Allowed users (usually admins) can generate access tokens to another user.
Users can generate theirs tokens too.