Continuing the discussion from Cannot Change Theme in Discourse — Nothing Works:
Hi Carlos! Welcome to our community.
Ugh, that’s annoying. I’m starting a new topic here if you are up for trying again with us. I’m not personally familiar with AWS Cognito. Can you tell us what you tried and where you got stuck? As a hosted customer, you can also reach out to team@discourse.org for personalized support.
According to our AI bot, it should be possible to set it up with the OpenID connect plugin.
AWS Cognito Setup for Discourse AI
tobiaseigen:
set up aws cognito
ForumHelperBot:
Thinking...
The user is asking about setting up AWS Cognito. AWS Cognito is an authentication service provided by Amazon Web Services that helps you add user sign-up, sign-in, and access control to your web and mobile apps.Let me search for any discussions or guides about AWS Cognito integration with Discourse to provide the most relevant information.
Search
Found 54 results for 'aws cognito integration discourse'
Thinking...
I'll analyze the search results to provide information on setting up AWS Cognito integration with Discourse.Based on the search results, there are several topics discussing AWS Cognito integration with Discourse. The main approach appears to be using the OpenID Connect Authentication Plugin for Discourse. Let me summarize the key information:
-
There are multiple topics where users have successfully integrated AWS Cognito with Discourse using the OpenID Connect plugin.
-
Some relevant topics include:
- “Anyone have a working AWS Cognito configuration w/ ouath2, openid or sso?”
- “Auto-sign-in with the OpenId Connect Plugin and AWS Cognito”
- “Custom Login Flow: AWS Cognito SSO (via Passwordless Signin) - Is this possible?”
- “OpenID Connect support in selfhosted Discourse instance”
-
The official OpenID Connect plugin for Discourse is mentioned in these discussions: GitHub - discourse/discourse-openid-connect: Allows an OpenID Connect provider to be used as an authentication provider for Discourse
-
One user mentioned they were able to enable SSO via AWS Cognito by following steps in these topics:
- “OpenID Connect Authentication Plugin”
- “Anyone have a working AWS Cognito configuration w/ ouath2, openid or sso?”
Let me read the most relevant topic to gather more specific instructions.
Setting up AWS Cognito with Discourse
Based on the search results, there are several successful implementations of AWS Cognito integration with Discourse using the OpenID Connect plugin. Here’s how you can set this up:
Step 1: Install the OpenID Connect Plugin
The Discourse OpenID Connect (OIDC) plugin allows you to use AWS Cognito as an authentication provider for Discourse.
To install the plugin, add it to your app.yml file:
- git clone https://github.com/discourse/discourse-openid-connect.git
Step 2: Configure AWS Cognito
- Create a user pool in AWS Cognito
- Set up an app client in your user pool
- Configure the callback URL to be
https://your-discourse-site.com/auth/oidc/callback
- Note your Cognito domain, client ID, and client secret
Step 3: Configure the OpenID Connect Plugin in Discourse
Go to Admin > Settings > Plugins > openid connect and set the following:
openid connect enabled
: trueopenid connect discovery document
: https://{cognito-domain}.auth.{region}.amazoncognito.com/{user-pool-id}/.well-known/openid-configurationopenid connect client id
: Your Cognito app client IDopenid connect client secret
: Your Cognito app client secretopenid connect authorize scope
: openid email profileopenid connect token url
: https://{cognito-domain}.auth.{region}.amazoncognito.com/oauth2/tokenopenid connect authorize url
: https://{cognito-domain}.auth.{region}.amazoncognito.com/oauth2/authorizeopenid connect user json url
: https://{cognito-domain}.auth.{region}.amazoncognito.com/oauth2/userInfo
Additional Configuration Options
- To enable auto sign-in, set
openid connect authorize url
to include?prompt=none
- You can customize the login button text with
openid connect button title
Troubleshooting
If you encounter issues:
- Make sure your callback URL is correctly set in both Cognito and Discourse
- Verify that your client ID and secret are correct
- Check that your Cognito user pool is properly configured to return the required user attributes
For more detailed implementation examples, check out this discussion where users have shared their successful configurations.
Would you like more specific information about any part of this setup process?