-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add external_id to token response #14
Conversation
Thanks for the contribution, this is something which is bothering me as well (and should ideally be mapped to the It's been a while since I worked on this - is the |
Actually in my testing, the external_id seems to be the value returned to represent the user's Discourse user ID. See an example response of available fields here:
When you mention |
I just tested it, and you are right - I must have been working on outdated information. To comply with the OpenID connect spec, we should ideally use the Can you update your PR to set the subject to |
Happy to make the change, but currently traveling internationally and won't return until the 1st. Once I'm home I can push those changes up. |
Just to confirm before I make this change, as this would be a breaking change for most.. Is this what you're thinking? (with nicer formatting of course)
|
Exactly - that would be it! I wouldn't think too much about breaking changes. We don't have a latest tag for containers (the one that builds from master is called master explicitly to call out that this is not stable) & if someone decides to update, it's on them to read the changelog |
Changes pushed! |
The default response does not provide a unique ID to match on. Discourse emails / usernames are subject to change, so matching on those values can result in duplicate accounts created in external systems.
This one line change provides the discourse User ID in the token response. This flow allows our system to catch the user ID, and do an upsert to the user in our database regardless of what username, email, or other value they have set.