After some experimenting with the SSO usability, it might be easier if we have a dedicated endpoint that will ALWAYS nuke the cookies and redirect the user to the base url, even if the external user is the same as the user logged into Discourse. This will allow us to very easily update/sync user account info for things like avatar, email, name, custom fields, etc. without using API. What are your thoughts on having a dedicated nuke endpoint (forum.mycompany.com/nuke&redirect) that will always nuke the cookies and redirect users to the forum’s base URL for SSO?
How this looks in real life:
If the user is logged into our webapp and has not visited the forum during their current session, the “Community” menu item in our web app will hyperlink them to the ‘nuked cookies & redirect to base URL’ endpoint (i.e. forum.mycompany.com/nuke&redirect)…this ensures that the correct user is authenticated into Discourse, and any recent account updates are made without the need for an API call. However, if the user has already SSO to the forum during their current session in our web app, our “Community” menu item will hyperlink them to the forum’s normal base url (forum.mycompany.com) and they will resume their existing session inside of Discourse.
Proposal:
Create a checkbox inside of Discourse’s SSO settings that enables a dedicated endpoint for ‘nuking cookies & redirecting user to base url’ (ex. forum.mycompany.com/nuke&redirect). Basically, adding a user friendly setting for /logout with redirect to the base url.