Because of a bug (https://github.com/craftcms/cms/issues/7657), I got locked out from admin because no site seemed to be marked as primary in the DB, even though one of the site files clearly had a primary:true setting.
This is using latest craft as of writing, 3.6.9.
Changing the primary site directly in the sites-table will cause the problem (WEIRD!), logging me out and refusing to log me in again. This doesn't happen in my dev environment when switching the primary site, so I'm not sure what's up here...
However, I restored a backup and tried it again (via
– jishi Mar 09 '21 at 12:56craft project-config/apply --force) and it successfully managed to switch primary site so I'm all good now.