Expiring all current sign-ins?

Currently moving an SSO-enabled Discourse forum to a new host.

My plan is below, but I don’t know how to to expire all current sign-ins (step 3).

The only setting I can see in the admin console that might be useful is “maximum session age”, but I’d prefer a “log everyone out immediately” button. Sadly I do not have access to the command line tools.

  1. Turn off SSO, so no new users can sign-in
  2. Sign in via /users/admin-login
  3. Expire all current sign-ins to avoid any loss of data
  4. Run backup
  5. Restore backup to new server

Is there a way to achieve this?

To protect against data loss you should put the forum in read-only mode from the backup page, but I think that this will log everyone out in the rails console:

  UserAuthToken.all.destroy_all
2 Likes

Yes see Is there a way to force a mass logout?

1 Like

Thanks guys. Unfortunately I don’t have access to the console to be able to use that command.

However that “Read only” button on the Backup page will prevent any activity being lost, thanks @pfaffman, I didn’t spot that.

When the backup is restored to the new server, will everyone start off as logged out?

This topic was automatically closed after 8 days. New replies are no longer allowed.