Idme.getAuthToken()

Retrieve access_token from using ID.me

Usage

Hover over inputs/exits for more info.

var Idme = require('machinepack-idme');


// Retrieve access_token from using ID.me

Idme.getAuthToken({

code: '',

client_id: '',

client_secret: '',

redirect_uri: '',

grant_type: '',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

code required

the exact code that you received during the authorization request.

''
client_id required

your client id

''
client_secret required

your client secret

''
redirect_uri required

your redirect URI

''
grant_type

The only supported value is currently `authorization_code`

''

Exits

error

An unexpected error occurred.

success

OK.

{ access_token: '3b57cc74ec7f1cf3e32527b1fa47e842a00755d643695a3dcbd0ee85885adb5c',
  token_type: 'bearer',
  expires_in: 300,
  refresh_token: 'edab2746ff2dd6863d84e5b7c88840a26f5727c8a0900a11f73fb6e508dc1bcc',
  scope: 'military' }