There are a couple of good examples here! One thing that I don’t like about the enum is that it mixes two concerns:
Authentication Result (Success, Failure), there are really only those two
User State, might even allow more than one (FirstLogin, LockedOut) etc
I would probably use a type like a tuple that returns something like
{Success, [FirstTime]}
{Failure, [LockedOut]}
Just a quick scratch, but you might the idea.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are a couple of good examples here! One thing that I don’t like about the enum is that it mixes two concerns:
I would probably use a type like a tuple that returns something like
{Success, [FirstTime]}
{Failure, [LockedOut]}
Just a quick scratch, but you might the idea.