According to Instagram Developers documentation, the access token returned to the redirect callback URL comes as a fragment in the form:
http://your-redirect-uri#access_token=ACCESS-TOKEN
The vast majority of web servers WILL NOT receive anything that follows the # in the uri, therefore the access token will be stripped and lost before it gets to the server that is ready to redirect.
I think this is a major limitation from the Instagram Authentication stack that has been present since the first version and I see no other solution than to solve it in the browser directly with JS or JS libraries.
Is there a way to get the access token as any other social network API supporting OAuth2 does, like so:
http://your-redirect-uri&access_token=ACCESS-TOKEN
This way, I would have a normal url param, which is handleable by probably any modern web server.