public async Task <ActionResult> Callback(string oauth_token, string oauth_verifier) { try { var requestToken = _cookiesService.Load(_cookieKey); var accessToken = await _service.GetAccessToken( new OauthToken() { Token = oauth_token, Secret = requestToken.Secret, Verifier = oauth_verifier }); _accessTokensRepository.Add(_service.GetType().Name, accessToken); return(RedirectToAction("Index", "Home")); } catch (Exception ex) { _logger.LogError(ex.Message); return(View("Error")); } }
public JwtTokenModel GetAccessToken() { var token = _oauthService.GetAccessToken(); return(token); }