During Authentication
Trusted Device Authentication
// Requesting an authentication using Cotter
var cotter = new Cotter(
<API_KEY_ID>,
userID,
);
cotter.trustedDevice.requestAuth(
'EVENT NAME',
this.onRequestSuccess,
this.onRequestError,
{}, // Add customization here, or leave as {}
(getOAuthToken = true), // π Add this parameter
);{
"CreatedAt": "2020-04-06T22:21:45.614843-07:00",
"DeletedAt": null,
"ID": 495,
"UpdatedAt": "2020-04-06T22:21:45.614843-07:00",
"approved": true,
"client_user_id": "xyzABC123",
"event": "LOGIN",
"ip": "73.15.208.6",
"issuer": "<your API KEY ID>",
"location": "Orinda",
"method": "TRUSTED_DEVICE",
"new": false,
"signature": "jiUHTm2zBcbkIYNbZ6...",
"timestamp": "1586236905",
"oauth_token": { // π NEW OAuth Tokens
"access_token": "eyJhbGciOiJFUzI1N...",
"auth_method": "TRUSTED_DEVICE",
"expires_in": 3600,
"id_token": "eyJhbGciOiJFUzI1Ni...",
"refresh_token": "96:ukrYGIisImyKXwKTR1tIuiR...",
"token_type": "Bearer"
}
}Getting and Removing tokens from the Storage
Storing and Removing TokensRenewing Expired Tokens
Renewing Expired TokensLast updated