Will Discourse ask for a username if it's not provided to /session/sso_login?

My account system does not have a username field: users log in with an email only. What will happen when I redirect the user to /session/sso_login and the username field in the payload is blank? Will Discourse correctly ask the user for that missing information?

I don’t see mention of this case in the SSO post. And although I see that username is an optional field, it seems like the implication is that it’s only optional if the user has a Discourse account already (ie: they aren’t new).

Thanks for your time! I realize I could code it up and just try it out myself, but it’d take a awhile to do so and I’m hoping one of you might be able to give a quick answer.

1 Like

We will auto-generate the username using provided fields, like email and name:



Wonderful, thank you. That’s a super useful answer, and a super useful feature :slight_smile:: the difference between me being able to use SSO or not.