Skip to content

How to determine if reauthentication is necessary when setting up Two-Factor Authentication in Headless API #3852

Closed Answered by pennersr
kagiya-n asked this question in Q&A
Discussion options

You must be logged in to vote

Suppose you check in advance -- given that there is always a bit of time between the check, and actually making use of the information you checked on, it may be the case that the information you were given is outdated by the time you are using it. So, you will always need to prepare for receiving a "reauthentication required" even if you were to check in advance.

Having said that, in the current session you can find the authentication methods, and the timestamp the method was used, see methods:

{
  "status": 200,
  "data": {
    "user": {
      "id": 123,
      "display": "Magic Wizard",
      "has_usable_password": true,
      "email": "[email protected]",
      "username": "wizard"
    }…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kagiya-n
Comment options

Answer selected by kagiya-n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants