I need to update my MVC process to allow for external OAuth process, as described in tutorials such as this one. However, every tutorial I find uses facebook/twitter/Microsoft, which is already built in functions. I need to use a different server and pass in a token. And I'm a client, not a server.
My setup is using the standard SPA project, with a login and etc. I will have to have it redirect to a page with the refresh token and store that refresh token for my future requests to an API. I have no problem with this, I simply cannot do the first OAuth call. And it seems, I'm not the only one having this trouble.
For this request to the OAuth 2.0 provider, I will have to add an access token to the request, then the user can login and click allow/deny.
POST {TokenPath} HTTP/1.1
Host: {AuthorizationServer}
Authorization: Basic {ThirdPartyAuthorizationCode}
Content-Type: application/x-www-form-urlencoded
grant_type = authorization_code
Then I will get a response from the POST with access_token and an expiration date.
So, how can do I do that?