79541046

Date: 2025-03-28 09:44:58
Score: 0.5
Natty:
Report link

I just stumbled over this question and face the same challenge in our API.

My current idea for implementing this is to respond with a 201 - CREATED which semantically would mean, that a login request was created, but is not yet completed and the user has to do something with it.

With this response I also generate and return a challenge token that must be provided in combination with the two-factor code to another endpoint handling pending two-factor requests. The challenge token must be short lived, about 5 minutes or so.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: jumper85