SSO integration no longer honoring admin permissions

AI-generated summary

JesseB reported that SSO integration no longer grants admin permissions upon login, preventing access to admin menus and the /admin endpoint, though the issue only occurs on fresh sign-ins. Moin suggested checking for Cloudflare, referencing a similar issue where Cloudflare’s auto-minify feature caused admin access problems. JesseB confirmed that Cloudflare was the cause and the issue was resolved.

Hello,

I exclusively use the SSO integration on my Discourse platform. I noticed today that, when I sign in to my Admin account using SSO, I no longer see the Admin related menus, and the /admin endpoint does not work.

However, on another device I have, which has remained logged in for about a week, I do see the Admin menu. This only seems to happen on fresh sign ins, which make me think that:

  1. admin permissions are stored in the session itself (which would make sense)
  2. the SSO integration is no longer properly adding in the admin permission when creating sessions

This means that, once my other device inevitably gets logged out, I’ll be stuck from accessing my admin menus.

I’ve confirmed with another admin on my forum, and the same happens to him if he signs in on an incognito tab.

I also used the “Impersonate” button on a test account earlier today, which is when I noticed this issue. I’m not sure if that would be related or not, but worth mentioning?

This now happens on all devices (Mac, PC, iPhone), as well as both admin accounts on my site, regardless of whether we clear cookies or not. We are both still listed on our /about endpoint as Admins, so we were not accidentally removed.

Hopefully this is easy to reproduce & resolve. If I can provide any more information, I’d be happy to do so.

Hey @JesseB :wave: Welcome to Meta!

Do you have Cloudflare?
There is another recent topic where this prevented the admin from accessing the admin area.

Major props for putting 2:2 together. I wouldn’t have assumed it was Cloudflare, especially given the fact that I just updated Discourse today — but that’s exactly it.

Thank you, issue resolved.