Problem has been solved. We had inadvertently had removed from the ADFS IdP configuration the “nameid” from the SAML response. Once we added that back in, the auto create account feature worked fine!
With both the create account option set to true and the other settings shown below in our app.yml
, we’re able to avoid having both login dialog windows being displayed. Now new users just click “Login”, authenticate via the IdP and then are put into their new Discourse account all without being able to override username, name and email address in an intervening dialog.
Once a user gets into Discourse, they cannot edit their email address, but we are allowing them to change their username so that they can have a more recognizable “nickname” in @ mentions and such.
...
# Force fullName attribute from SAML assertion to override name attribute so that
# the user's full name will be mapped to Discourse's Name field and will help
# augment the numeric User Name field on posts.
DISCOURSE_SAML_ATTRIBUTE_STATEMENTS: "name:fullName"
DISCOURSE_SAML_AUTO_CREATE_ACCOUNT: true
...
- exec: rails r "SiteSetting.login_required=true"
- exec: rails r "SiteSetting.enable_local_logins=false"
- exec: rails r "SiteSetting.email_editable=false"
- exec: rails r "SiteSetting.display_name_on_posts=true"
- exec: rails r "SiteSetting.prioritize_username_in_ux=true"
...