When working against the instagram API, it requires the client to capture ?code=[some code]
from a successful OAuth response:
Step Two: Receive the redirect from Instagram
Once a user authorizes your application, we issue a redirect to your redirect_uri with a code parameter to use in step three.
http://your-redirect-uri?code=CODE
By default the OWIN middleware causes a redirect to /signin-instagram
where the request is handled and then passed on to a new path that I choose (eg /oauth/instagram
) where I get access to an OWIN context.
Because of the chained redirects the code
querystring value is lost and it seems that I need a way to retrieve it from the OWIN context, but I can't find one.
The answer is that you don't. The owin provider should be (and is for Instagram) fetching anything relevant on the querystring and insert it into the Claims
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.