-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make user first and last name optional fields #4988
feat: make user first and last name optional fields #4988
Conversation
✅ Deploy Preview for docs-zitadel-com canceled.Built without sensitive environment variables
|
@@ -39,7 +39,7 @@ services: | |||
user: '$UID' | |||
volumes: | |||
- .:/e2e | |||
command: 'sh -c "npm ci --omit=dev && npm run lint && npx wait-on http://localhost:8080/debug/ready"' | |||
command: 'sh -c "npm ci --omit=dev && npm run lint && npx wait-on -v -l http://host.docker.internal:8080/debug/ready"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix WSL support for this compose file - without this npx wait-on never finishes for me.
I suggest we should create a feature branch in the zitadel repo, and re-target this PR to that branch, since this doesn't complete all AC. |
This is necessary now that first and last name are optional. Display name will default to first and last name, or username.
Hei @Alexei-Barnes |
I did some testing on this today and found that this doesn't finish the problem of making first & last name optional - during registration from an IdP that didn't provide these details, the application got confused and produced the error |
I've managed to shift off other priorities and back to this, so hopefully I can fix those problems today. |
OK the "NotHuman" error is simple;
func (h *HumanView) IsZero() bool {
return h == nil || h.FirstName == ""
} will return true when called by
// if there's an active (human) user, let's use it
if user != nil && !user.HumanView.IsZero() && domain.UserState(user.State).NotDisabled() {
request.SetUserInfo(user.ID, loginName, user.PreferredLoginName, "", "", user.ResourceOwner)
return nil
} and conclude that this user can't be found. |
OK fixing that fixed both of the problems I identified, I managed to register a user via AWS Cognito with no first or last name configured, then use that to login. |
This changes the `IsZero` test for `HumanView` by ensuring that we don't assume that first name must be set for a user to be valid.
I've noticed another problem with this change, which is that some pages show a robot avatar for the user, while others do not. I'll need to figure out why and update the UI to ensure the user is not considered a bot. |
I have created a new user story regarding the topic about setting the required fields, before we can merge this, we should implement that: #5333 |
As we are currently re-writing user management as user schema, this PR seems to have become obsolete. Apologies for not merging your code. But know your effort was not in vain, it sparked a heavy and long-running debate which will result in a better zitadel that allows more flexibility in user management, Thanks for the effort and hope seeing you around! |
This change partially completes #4386 by making the First Name and Last Name fields optional.
It completes the following acceptance criteria:
It does not address the following acceptance criteria:
This bites off the easiest chunk of this issue, since there is still some figuring out to do around user email address.