In a discussion about OAuth2 SSO configuration, patrickeaton reports that after a successful OAuth2 flow and user data retrieval, users are redirected to the login page instead of being registered. david clarifies that this redirection is expected, but a registration popup should appear to confirm account details — which patrickeaton confirms is blank. The issue stems from missing required fields: while id is sufficient to link accounts, Discourse also requires username and email to auto-populate the signup form. patrickeaton initially only provided id and username, and upon adding email to the endpoint, the form begins to populate correctly patrickeaton. david confirms that oauth2_json_username_path must be set to username for it to appear. Later, patrickeaton asks about auto-confirming users to skip the modal, which david confirms is not yet possible but is planned. rishabh inquires about the external_auth_skip_create_confirm setting, which david confirms is supported across all Discourse auth providers, including OAuth2.
My configuration for Oauth basic is behaving quite odd, I had a few errors initially during setup and have resolved them. However, now I can see the flow going from Discourse → Cognito Authorize Endpoint → Discourse Callback → Discourse /login. There is no warning or errors in the log, and when checking the logs, I can see that there is a successful JSON call to grab the user data.
Given that it appears to have a successful token and has loaded the JSON data, I would expect the user account to be successfully registered, instead the user is redirected to the login page.
Unfortunately, that information is coming up blank with nothing to confirm without entering it all their information.
Also, is it possible to auto-confirm the user? Their email is already verified on our side and I’d like to keep this experience as seamless as possible for our users?
The minimum data to connect the account to a Discourse account is just the id. However, Discourse needs a username and email. That’s why we pop the sign-up modal.
If you can add that information to the OAuth API then that would make things much smoother for your users