RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.49k stars 10.55k forks source link

Support for OAuth Realtime API for client #7413

Open VasudhaMathur opened 7 years ago

VasudhaMathur commented 7 years ago

Hi, I'm building an Qt/QML interface to Rocket.Chat, called Ruqola. Password login works fine but now we're planning to have OAuth supoort. When used this, it gave this error- {""errorType":"Meteor.Error", "message":https://rocket.chat/docs/developer-guides/realtime-api/method-calls/login#using-authentication-providers [145546287]", "reason":"No matching login attempt found"}, "id":"1", "msg":"result"} On the Rocket.Chat support channel, a team member said this is currently unavailable and that you won't support OAuth login via realtime API. Can you suggest any other way to implement OAuth in our client?

VasudhaMathur commented 7 years ago

Also, please update the doc if this functionality is currently not available :)

graywolf336 commented 7 years ago

@VasudhaMathur can you link to the message/screenshot of the conversation on the support channel? We support oAuth on the desktop client which uses the real time api which means ideally it should be possible however I am curious the reasons they gave you as to why not.

VasudhaMathur commented 7 years ago

@graywolf336 Here is the series of sreenshot-

screenshot_20170801_182105

screenshot_20170801_182227

screenshot_20170801_182302

screenshot_20170801_182352

screenshot_20170801_182437

rodrigok commented 6 years ago

@VasudhaMathur can you explain the flow you want to do? Cuz it's possible to execute the OAuth login via Realtime API and via REST API, you just need to execute the web flow to get the final token to pass to the login method.

VasudhaMathur commented 6 years ago

@rodrigok I'm executing the web flow using the real time API { "msg": "method", "method": "login", "id":"42", "params": [ { "oauth": { "credentialToken":"credential-token", "credentialSecret":"credential-secret" } } ] } But recieved this error- "message":https://rocket.chat/docs/developer-guides/realtime-api/method-calls/login#using-authentication-providers [145546287]", "reason":"No matching login attempt found"},

Maybe there's a problem implementation of the web flow. I'll check and get back to you :)