The discussion revolves around the issue of Discord prompting for authentication every time a user logs in to a Discourse forum using their Discord account. Mako initially reported the issue and Coin-coin le Canapin confirmed that they were experiencing the same problem.
Mako clarified that this is not the intended behavior, as other sites and forums they use only require Discord authentication once. David Taylor suggested that it might be the expected behavior of the Discord login system, but Mako disagreed.
Arkshine proposed that the issue might be due to the missing prompt parameter in the auth URL, which controls how the authorization flow handles existing authorizations. Mako found a related discussion on the Auth0 community forum, which suggested that the prompt parameter should be set to none to skip the authorization screen.
Mako attempted to update the Discord login setup in Discourse by adding the prompt parameter, but it only partially fixed the issue. David Taylor suggested that a change to add prompt=none would be a good solution, but Mako found that even with the change, the Discord authentication page is still displayed.
Michael Brown ultimately concluded that the issue is not with Discourse, but rather with how Discord handles authorization flows, and that setting prompt=none only skips the authorization screen if the user has previously authorized the application.
When a user signs in with discord, they are taken to the authorization page every time, meaning they have to agree the authorization anytime they login. From my understanding, this should just be a one step process upon the very first time they connect discord login with discourse.
Do you see the same behaviour on other sites which offer “login with Discord”? If so, it might be the expected behaviour of the Discord login system, rather than a Discourse-specific issue.
This is not the intended behavior. Other sites and forums I use login with discord only requires a one time authentication. After that, any time you login with discord you’re automatically logged in without going to the auth page.
I wonder if it’s because of the missing prompt param to none in the auth URL?
prompt controls how the authorization flow handles existing authorizations. If a user has previously authorized your application with the requested scopes and prompt is set to consent , it will request them to reapprove their authorization. If set to none , it will skip the authorization screen and redirect them back to your redirect URI without requesting their authorization
within the file and rebuilding, seeing if that fixes it.
Edit: On second thought, I don’t think I can locate the file that would allow me to implement this. I think a fix from Discourse is what is necessary in order to get this functioning as intended.
Cool. Do I need to do anything else (but wait for an update?)
I’m assuming there is no real ETA for a fix like this, and it likely depends on an urgency status flow. It’s just a minor inconvenience, I suppose. But it would be awesome to see fixed!
It still takes you to the discord auth page, however, the user no longer has to click authorize. The page will reload then take you back to your discourse page.
One step forward, another step backward.
Edit: I see @Arkshine and I tested the change and got the same result.
Even with the change, it still proceeds you to the discord authentication page - which it shouldn’t do (although this time you don’t need to manually press authenticate).
Submitting a PR with the suggested change unfortunately would not fix the issue.