generateAccessToken method

  1. @override
Future generateAccessToken({
  1. required String refreshToken,
})
override

Implementation

@override
Future<dynamic> generateAccessToken(
    {required final String refreshToken}) async {
  _dio.options.headers['Authorization'] = 'Bearer $refreshToken';
  try {
    final response = await _dio.post('/User/GenerateAccessToken');
    return response.data;
  } on DioException catch (e) {
    if (e.response != null) {
      throw e.response.toString();
    } else {
      throw e.message.toString();
    }
  }
}