Discourse SSO met Wordpress als provider geeft foutmelding ongeldige aanvraag

AI-generated summary

Lagger_Gandalf reports an “Invalid Request” error when users access their Discourse forum (discourse.sub.domain.com) directly after logging in via WordPress (sub.domain.com/login). The error occurs only on first login attempts for existing users — new users log in without issue. Despite successful login (confirmed by Discourse logs) and valid SSO secrets and API keys, the error persists. Debug logs in both WordPress and Discourse show no errors. Lagger_Gandalf notes the SSO sync works flawlessly for new users. angus suspects the issue may relate to multi-level subdomain usage and plans to reproduce and investigate further.

Im currently facing a strange Issue on my Wordpress and Discourse Installation.
I’ve setup Wordpress as SSO Provider for Discourse since 2018.

So far everything worked fine. Since recent I get the Error “Invalid Request” , when a User is accessing the Forum on the Sub Url “discourse.sub.domain.com” directly, gets redirected to the Wordpress Login Page “sub.domain.com/login” and logs in:

When the User access the Forum URL again “discourse.sub.domain.com” he’s logged in and everything works fine.

I’ve renewed the SSO Secrets and they seem to work fine, the User Login works. I also did renew the API Key and that one also works:


I’ve activated the Debug on Wordpress and Discourse, but no error gets logged inside it:


Does the Wordpress SSO Plugin have any other debugg login option to check?

When a new User is created, the SSO Sync works flawless and the User doesnt get the Error displayed “Invalid Request”.

When I try a older User, I get on the first login attempt the Error “Invalid Request”.

Also the Discourse Log shows, that the Login was succesfull without error:

Thanks for your report, I suspect if there’s an issue it will be related to the multi-level subdomain usage. I’ll see if I can reproduce it and get back to you soon.