We are using the self-hosted version of rocket chat on our AWS instance. We ended-up in a situation that we have to explicitly login to rocket chat using a username and password to use rocket chat.
To resolve this, we were searching for an alteranate solution and found custom OAuth functionality.
We are now trying to implement the Custom OAuth functionality with our application. But the authentication not working as expected.
We are unable to find a step by step implementation of the Custom OAuth functionalty.
We have upgraded our rocket chat to the latest version, still no luck.
Can you please help me out to rectify this situation.
Hi John,
Thanks for the feedback.
I have followed the steps provided in the above documentation and done the integration as mentioned. But when I tried to login I’m getting error “No matching login attempt found”. In the above documentation, there is no further details about the URLs needed and the value should be returned from specific URLs. So bit confused about the custom OAuth integration.
I am going to come in here because this is related to my problem asked in the thread where I did a complete fresh install.
John, to be honest here you are not giving anything that can help Nafil. As I stated in an earlier post, I have an oauth2 server; custom code, that worked with an earlier version of Rocket.Chat; have forgotten the version number now as I foolishly threw away the install instead of archiving. Avatars imported from the social site to Rocket.Chat. An upgrade broke the avatar import. Mostly likely it is due to changes in the oauth on Rocket.Chat side.
What Nafil needs is what I need; we need to know what Rocket.Chat is expecting to be sent from our oauth server. There are additional fields in the custom oauth section in Rocket.Chat that didn’t use to be there when avatar import worked.
Where can we go in Rocket.Chat to study the code? Perhaps I can figure it out although I am only use to php and javascript code. We need to know what Rocket.Chat is expecting. In my case I am giving Rocket.Chat the location of the avatar on my server but perhaps I am not doing it in a way that Rocket.Chat can use.
Zulip shows scripts and codes in their documentation when explaining how to implement a custom oauth. Similar help here with Rocket.Chat would be very helpful. If I am not sending the proper information to Rocket.Chat from my oauth2 server, then the connection won’t work.
Yes what kim said is right. That’s is my exact issue. I have configured the custom OAuth as per the documentation and a button is placed in the signin page.
when i click on the custom Sign in button it will popup a window to /oauth/authorize
from here which data i have to send back to rocket chat to verify the user in our application database. do i have to return the rocket chat username , email or token?. Currently we are returning the key of the rocket chat client user token. This is showing the error,
No matching login attempt found.
Since the documentation doesn’t have much information about what are the URLs required,
What data should be returned, how the response data should be prepared, if needs a token what should be the token type, is it a base64 version etc.
This makes difficult to do the custom OAuth implementation in our application.
So if you can explain the response data structure and what are the required parameter and optional parameters to be sent to rocket chat, it will be easier for us to do the custom OAuth integration.