Ask HN: Does anyone else have problems with Instagram API OAuth2?
31–40 of 82 posts
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#32To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#33To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…
This solution is insecure. Any person can intercept token and make harm to your application.
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#34To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#35To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…
but this is better than nothing, thank you!
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#36To temporary fix the issue, you could do the following: change response_type=code to response_type=token. Instagram will redirect back to your site with something like /callback#access_token=123456. From here, send the user to a very simple page with the following snippet: if (window.location.hash && window.location.hash.indexOf('#access_token=') !== -1) { var accessToken = window.location.hash.replace('#access_token…
Where would I change response_type=code to response_type=token?
https://api.instagram.com/oauth/authorize/?client_id=CLIENT-...
Depending on the library you use, it may be default to response_type=code. Just get the URL and do a search and replace if the library doesn't allow you to define the type.
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#37Earlier quoted context omitted.
Where would I change response_type=code to response_type=token?
When you generate the server side explicit flow, it looks something like this: https://api.instagram.com/oauth/authorize/?client_id=CLIENT-... Depending on the library you use, it may be default to response_type=code. Just get the URL and do a search and replace if the library doesn't allow you to define the type. See https://www.instagram.com/developer/authentication/
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#38Earlier quoted context omitted.
Where would I change response_type=code to response_type=token?
When you generate the server side explicit flow, it looks something like this: https://api.instagram.com/oauth/authorize/?client_id=CLIENT-... Depending on the library you use, it may be default to response_type=code. Just get the URL and do a search and replace if the library doesn't allow you to define the type. See https://www.instagram.com/developer/authentication/
Something tells me however that just changing it to 'token' (file strategy.js, line 217) actually fixes it, now there are other issues with many redirects when just changing that line, Im not entirely sure how that library works to fix anything else at this point, do you know when this issue might be resolved as a whole?
Re: Ask HN: Does anyone else have problems with Instagram API OAuth2?
#39Earlier quoted context omitted.
When you generate the server side explicit flow, it looks something like this: https://api.instagram.com/oauth/authorize/?client_id=CLIENT-... Depending on the library you use, it may be default to response_type=code. Just get the URL and do a search and replace if the library doesn't allow you to define the type. See https://www.instagram.com/developer/authentication/
I use this library: https://github.com/jaredhanson/passport-oauth2 Something tells me however that just changing it to 'token' (file strategy.js, line 217) actually fixes it, now there are other issues with many redirects when just changing that line, Im not entirely sure how that library works to fix anything else at this point, do you know when this issue might be resolved as a whole?