Automatic account creation and login when login_required is false

Hi folks,

I previously had configured an SSO flow where login_required was set to true and it worked nicely. Users within my application follow a link to the community and their account is automatically created and immediately logged in (a disclaimer notifies them of this process).

Now I want to reduce this requirement, and expose the site content to allow for anonymous access, however, the flow of a ‘logged in user in my application’ should still be the same. i.e. if they come from within my application their account should be automatically created and immediately logged in. They shouldn’t be treated as anonymous.

The image displays a login requirement notice that asks users to authenticate to read content and disallow anonymous access. (Captioned by AI)

I’ve tried toggling site settings, but auth immediately only takes effect when login_required

image

How can I I achieve this?

You can achieve that by linking to https://community.example.com/session/sso for authenticated users in your application. That will trigger the login / account creation flow. You could also add the parameter ?return_path to link to a specific page.

For unauthenticated users you should still link to https://community.example.com.

1 Like

Excellent. Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.