How to setup okta authentication with discourse

AI-generated summary

In a discussion about integrating Okta authentication with Discourse, annakulaachyuth asks if users can log in to Discourse using their Okta credentials and be automatically signed in if already logged into their app. david recommends using the OpenID Connect plugin and explains that setting login_required will trigger automatic Okta authentication if the user has an active Okta session. However, annakulaachyuth clarifies they want users to view posts without logging in, which conflicts with login_required. david confirms that to allow read-only access, login_required must be disabled, meaning users will need to manually click “login” — though custom logic in the app might automate this, Discourse itself doesn’t support automatic login without login_required.

We are using okta as identity provider for our application. Can we enable users to log in to our discourse community with the same credentials via okta and even they need to be auto logged in if they were logged in my app.

You should be able to configure Okta integration using the openid-connect plugin

What about auto log in?..I mean when my user log in to my app he need to automatically logged in or signed up into discourse(No need for authentication again).

If your Discourse site is set to login_required, then authentication with Okta will be triggered straight away. If the user has an active session on Okta then they will be logged in without any interaction.

If your Discourse is not login_required then users will just need to tap/click “login” once

So, if we set login_required , then there is a chance of forcing the user to log-in if he was not logged into my app…right?
Even he/she could not able see any of the community posts if he was not logged in!!!
We also want the user to see posts(Read-only) even without logging into my app.

Then you will need to leave login_required disabled, and the user will have to click the button to login. There may be some tricks you can do in your app to trigger the login automatically, but there is nothing in Discourse itself that will do it.