accessTokenInfo method
Fetches accurate access token information from Kakao API server.
Token infomration on client side cannot be trusted since it could be expired at any time on server side.
- User changes Kakao account password and invalidates tokens
- User unlinks from the application
Implementation
Future<AccessTokenInfo> accessTokenInfo() async {
return ApiFactory.handleApiError(() async {
Response response = await _dio.get("/v1/user/access_token_info");
return AccessTokenInfo.fromJson(response.data);
});
}