Imported user unable to log in if no SSO details in Discourse

Discourse has changed the way it deals with users when the SSO parameter require_activation is set to true. When that parameter is set, Discourse will no longer match existing users to new users by their email address.

You are going to have to manually create an SSO record for this user through the rails console. Based off the values in your logs, you can create the record like this:

First, get the user’s Discourse id:

User.find_by_email('example.user5656@gmail.invalid').id

Substitiute that id for <user-id> in the command below. The last_payload is intentionally set to an empty string:

SingleSignOnRecord.create(user_id: <user-id> , external_id: 1002 , external_email: 'example.user5656@gmail.invalid', last_payload: '')

The user should now be able to login.