We have recently transitioned our main website from an old Django backed website to a new WordPress based website. We have migrated users, and are trying to switch the SSO provider from our old platform to our new one. Is there a fast/easy way to delete old single sign on records so that the new WordPress platform can re-sync users with their existing Discourse accounts?
There is a method called
SingleSignOnRecord.destroy_all. I’m pretty sure that running it inside a rails console (
/var/discourse/launcher enter app,
rails c) will either do what you want… or hose your site.
If you’re adventurous, take a backup and try it, or wait for someone with more knowledge of this system to answer
For reference, this topic relates to this WP Discourse GitHub issue: Matching existing Discourse user accounts · Issue #279 · discourse/wp-discourse · GitHub.
I’ve tried out @fefrei’s approach in my development environment (with 10 users) and it worked there without any problems.
This sounds fishy – “It did not completely hose the site even a little bit!”
Thanks for reporting back!