Logging a user into rocketchat and directing them to page.
lcundiff opened this issue · 6 comments
I was wondering if it was possible to log a user in for them so that they don't need to enter in their login credentials?
I used:
with sessions.Session() as session:
ROCKET = RocketChat( "email", "pw", server_url=ROCKET_URL, session=session, )
to log a user in using the API, but if I direct them to a rocket chat page, they aren't logged in as if they had entered the info themselves. Is there any work around of sorts where I could accomplish this using the api?
Apologies in advance if this isn't clear. Any help or clarification is appreciated
AFAIK, the REST API does not provide anything like that. It does provide other authentication mechanisms https://docs.rocket.chat/api/rest-api/methods/authentication but they are impractical/impossible to test and nobody has asked for them so far.
Thank you for responding. If its impossible to login users so they can see their messages, then perhaps its possible for me to use the API to get the messages and display them on the UI of my app. Would you say thats the only work around for a user to see their messages without them logging into rocket chat themselves?
Again apologies for my ignorance in advance.
Oh, I think I misunderstood you. A user can login directly with the API and retrieve their messages. They don't need to open the Rocket.Chat page for anything to do this.
Yes but I am trying to display the messages to them. I'd prefer to simply use the rocket chat interface itself (hence directing the user to the channel), but judging by what you described, that isn't possible. So I assume the only way to show a user their messages would be to create my own display of the messages correct?
In short, I am asking how to allow a user to use rocketchat messaging UI without them manually logging in.
Using the API, yes, the only way I'm aware of would be to create your own interface to show them
Stale issue