Implicit Auth. Flow - No Access Token Appended on Redirect - iOS

耗尽温柔 提交于 2019-12-24 18:43:37

问题


I made a web app with Instagram API that uses Client-Side (Implicit) Authentication.

I redirect the user to

https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token

and the Instagram log-in page appears. Normally, Instagram redirects the app to

http://your-redirect-uri#access_token=ACCESS-TOKEN

And I grab the access_token to use it in the app. This works in Chrome, Firefox, and Edge on my pc.

However, the redirection doesn't work on my iPhone 6. I tried both Chrome and Safari. The redirected address turns out to be the one without #access_token appended, i.e:

http://your-redirect-uri

Is it something to do with security and impossible to work, or am I missing something?


回答1:


Turns out the redirect URI has to end with a / for proper redirection on iOS.



来源:https://stackoverflow.com/questions/52257257/implicit-auth-flow-no-access-token-appended-on-redirect-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!