brisk icon indicating copy to clipboard operation
brisk copied to clipboard

Save two factor auth credentials

Open keith opened this issue 7 years ago • 2 comments

The token received from one authentication is good for some time frame defined by the response JSON. We could store this so we don't have to re-ask for a few days(?)

keith avatar Aug 16 '17 21:08 keith

Here's the format of the response that includes the TTL:

{
    "accessToken": "<secret>",
    "dsid": 12345,
    "firstName": "...",
    "lastName": "...",
    "nickName": "...",
    "tokenExpiresAt": "2018-01-16T09:24:58+0000",
    "tokenExpiresIn": "36000 Seconds",
    "tokenType": "User",
    "user": {
        "active": true,
        "appleConnectName": "...",
        "company": "...",
        "department": "...",
        "email": "...",
        "firstName": "...",
        "id": 12345,
        "lastName": "...",
        "nickName": "...",
        "phoneNumber": "...",
        "type": "external"
    }
}

keith avatar Jan 15 '18 23:01 keith

It appears to only last 10 hours, so I don't think saving it is as useful as I hoped. We probably should anyways, we just need to know what happens when one expires so we can handle re-authing.

keith avatar Jan 15 '18 23:01 keith