Description
Checklist
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the Issue Tracker for a feature request that matches the one I want to file, without success.
Suggestion
The Authentication.UserCreate
RPC accepts a UserCreateRequest
message type, which includes a bool
field named verify
.
The current behavior of this field is highly misleading in regards to how user creation and verification are handled.
At a glance, the field's name clearly suggests that setting it to true would immediately verify the user.
However, in practice, setting verify to true does not result in verification, but instead implies that the user must be verified later.
In contrast, setting it to false doesn't merely not enforce initiating the verification process, but actually verifies the user on the spot:
user = await models.User.getInstance().create({
email,
hashedPassword,
isVerified: !verify,
});
This behavior is not intuitive and can easily lead to mistakes in user management logic.
To improve clarity and align the behavior with user expectations, I'd consider introducing the following breaking changes during the next major version bump:
- rename the proto field to
isVerified
orverifyUser
(so as to prevent implicitly breaking existing consumers) - likewise, update the RPC wrapper method in
grpc-sdk
Metadata
Metadata
Assignees
Labels
Type
Projects
Status