With JWT login, I end up at..
My auth service manages users and only JWT login in enabled. I don’t want users having different usernames between the discourse and the platform. How do I prevent this screen from showing up?
The discussion revolves around preventing the ‘Create New Account’ dialog from appearing during JWT login in Discourse. arivanandan explains that despite having only JWT login enabled and pre-filling username and email in the token, the registration form still shows up. itsbhanusharma suggests disabling all login options except the desired one, and pfaffman specifically recommends disabling local logins. However, arivanandan notes that even with all other logins disabled, the form persists, suggesting a possible issue with the discourse-jwt plugin. david clarifies that Discourse requires collecting username and email, which can be pre-filled via token claims, but the form still appears. arivanandan seeks a way to either disable editing of these fields or completely hide the form.
Disable all the login options except the one that You want to keep. That’ll do the trick.
In particular, disable local logins.
If any social logins are enabled, modal still shows up I guess?
I tried checking / unchecking various settings related to login, still shows up. JWT is the only login method enabled.
Is this related to discourse-jwt or more of a general form?
In case it escaped your notice, this is the registration form, not a login form.
When discourse isn’t using internal auth, either of those should be disabled.
But this can be specific to JWT as I’ve never personally tried using it.
Everything else is disabled. Probably something to do with GitHub - discourse/discourse-omniauth-jwt: An OmniAuth strategy that uses JSON Web Token for Single Sign-On · GitHub then.
Yes the create account dialog will appear even if JWT is the only login method. We need to collect extra data (username and email) so that Discourse functions correctly. You can pre-fill the fields by supplying the values as “name” and “email” claims in the token.
These will always be available in the JWT and I prefill them. I want to disallow editing of these fields.
Or better yet, not show the form at all.