Are you using Google Chrome? Chrome 97 introduced a bug which broke DiscourseConnect SSO logins
https://bugs.chromium.org/p/chromium/issues/detail?id=1286367
We’ve added a workaround for the issue in the latest version of Discourse, so make sure you’re up-to-date. (our hosted discourse.group sites are up-to-date, so maybe that’s why things were working there)