refactor(auth): make OTP login a two step process #33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, upon logging in we have to send the OTP directly with the request. However, in reality, we will not know whether this is needed for logging into an account. This will prove unworkable once the front end is being implemented.
New process will have to be:
This is in some more detail:
Example Flow
Client sends login request:
Server responds with 401 if 2FA is required:
Client sends OTP verification request:
Server verifies OTP and responds with JWT:
Note that we use
access_token
andrefresh_token
instead :)