I'm using Octokit to authenticate a user from my app. I'm successfully getting the Code and State parameters back from Github. But when I try to create an access token, it throws an exception. What am i doing wrong?
Here is the code in my Authorize function -
public async Task<ActionResult> Authorize(string code, string state)
{
var req = new OauthTokenRequest(clientId, clientSecret, code);
var token = await client.Oauth.CreateAccessToken(req);
Session["OAuthToken"] = token.AccessToken;
}
I get a very generic error - "An error occured with this API request".