I'm working on creating a custom authentication user interface for my Rocket.Chat application. For this, I'm using AWS Cognito and the AWS SDK for communication with Cognito. I'm not using the default user interface provided by Cognito, as it is quite basic in design. Instead, I have developed my own custom user interface and connected it to Cognito through SDK calls.
Now, I'm facing a challenge: how can I integrate this with my Rocket.Chat application? I noticed that in the workspace under settings > OAuth, we can create a custom OAuth and provide all the necessary integration values. However, I need guidance on how to implement this so that when a user is successfully authenticated with Cognito, they are redirected to my Rocket.Chat application's home page from the login screen.
I'm working on creating a custom authentication user interface for my Rocket.Chat application. For this, I'm using AWS Cognito and the AWS SDK for communication with Cognito. I'm not using the default user interface provided by Cognito, as it is quite basic in design. Instead, I have developed my own custom user interface and connected it to Cognito through SDK calls.
Now, I'm facing a challenge: how can I integrate this with my Rocket.Chat application? I noticed that in the workspace under settings > OAuth, we can create a custom OAuth and provide all the necessary integration values. However, I need guidance on how to implement this so that when a user is successfully authenticated with Cognito, they are redirected to my Rocket.Chat application's home page from the login screen.
Share Improve this question asked Mar 29 at 21:40 Ebrahim AfridiEbrahim Afridi 11 Answer
Reset to default 0From a quick look at the docs, it looks like Rocket.Chat can integrate with an OIDC compatible IdP (set up via the OAuth settings you mentioned).
Cognito is an OIDC compatible IdP, so you should be able to configure Rocket.Chat to use Cognito using the endpoints listed here. However, using Cognito directly as an OIDC IdP like this means using the hosted UI.
To integrate with your custom UI using the Cognito SDK, you would need to implement your own OIDC authentication server on top of Cognito.
While that's doable, it would mean a fair bit of additional complexity (and therefore risk) that you probably want to avoid. So I'd recommended customizing the hosted login UI rather than building your own auth UI + OIDC server.