tokenFromCode method
- String deviceCode
override
Method for verifying user auth code and conversion into a RefreshableTokenMap.
Implementation
@override
Future<RefreshableTokenMap> tokenFromCode(String deviceCode) async {
final response = await _sendRequest(OAUTH_TOKEN_URL, {
'client_secret': clientSecret,
'grant_type': 'http://oauth.net/grant_type/device/1.0',
'code': deviceCode,
});
return RefreshableTokenMap.fromJson(response);
}