External IDs not being sent correctly

Created on 27 April 2020, about 4 years ago
Updated 20 May 2023, about 1 year ago

Drupal is not sending external IDs correctly. Instead of the Drupal uid Discourse receives the name.

Per the Discourse SSO specs (https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/1...) this is something that should never change, thus using name here is incorrect.

external_id is any string unique to the user that will never change, even if their email, name, etc change. The suggested value is your database’s ‘id’ row number.

The fix requires a minor change in includes/discourse_sso.endpoint.inc

'external_id' => $user->name,

to

'external_id' => $user->uid,

🐛 Bug report
Status

RTBC

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024