Lilly
September 4, 2023, 11:46pm
7
Ankur Tyagi:
Hello @Lilly
Thanks for your reply.
I tried it with a new user as well as updating locale for an existing user, but it did not work. I think it only works for anonymous users case. I am looking for a solution for logged in users.
It would be helpful if you can review the setup configuration details below, may be there is something I need to update to fix it, not sure.
Discourse forum version: Discourse 3.2.0.beta1-dev
JS package used for sso: discourse-sso ( version: 1.0.5 )
Discourse package link: discourse-sso - npm
Hi @Ankur_Tyagi I am sorry you are still having problems. Did you review Simon’s advice using the locale_force_update
parameter? I think everything I know about SSO is from @simon
I would carefully go through this information @simon posted as well as the official DiscourseConnect SSO How-To that has been linked.
simon:
Unfortunately, to update the locale, or any other attributes via the DiscourseConnect payload, the user will have to log out of Discourse, and then log back in again. This means that it is unlikely that the user will get the updated locale right away. There is a workaround for this, but I do not think it is handled by the discourse-sso npm package. To update a user via DiscourseConnect without requiring them to log out and log back into Discourse, you need to make a call to the sync_sso
route. Details about that are here: Sync DiscourseConnect user data with the sync_sso route .
If you are having trouble getting the locale set correctly for new users, or for users who log out and back in after adding the locale parameters, try enabling the verbose discourse connect logging
Discourse site setting. That will allow you to see the parameters that are being sent to Discourse from your site’s /logs
page (found at Admin / Logs / Error Logs.)
The verbose discourse connect logging setting and logs can help you troubleshoot this:
1 Like