DiscourseConnect SSO error

Hey Brains Trust!

I have a problem with the SSO.

An existing user who has been authenticated and was previously able to login now gets this message when attempting to access the forum:

Here’s his SSO details:

I am able to impersonate his user, but cannot login via wordpress.

In the error logs, this is the error:

I have no idea why. Over to you wonderful intelligent people!

Hey @jakelunniss,

The error in Discourse logs seems to be related to another user (note the name attribute).

As for the user who’s unable to log-in, I suspect the issue is that require_activation is set to true in the SSO payload. This prompts Discourse to try and create a new user instead of looking up an existing one. As his account already exists, the error is thrown.

There might be a few reasons why require_activation is true for an existing user, however could you go to the user’s Wordpress profile, check this box and click “Update Profile”

Then ask him to attempt to login again.

(I’m assuming here you don’t have any custom code on your Wordpress which uses the filter discourse_email_verification)

p.s. I would recommend obscuring the email addresses in the screenshots (data privacy etc.)

Hey @angus

Thanks for replying!

Firstly, the email address - Johnathan is a friend of mine. His email address is visible on his website and he doesn’t give two poops about privacy. Otherwise I would have obscured it.

I checked the email address verified on his profile and it was already checked.

I unchecked this:

image

And that seems to have resolved the problem.

No, there’s no custom code using the filter discorse_email_verification

The issue has popped up for another user today so I’d still like to get to the bottom of it, as we’d prefer that users can’t change their email address in discourse.

Thanks again!

Did he change his email recently, or is the log screenshot of an error from a different user?