PHP-Instagram-API icon indicating copy to clipboard operation
PHP-Instagram-API copied to clipboard

Configurable authorization functions

Open caje731 opened this issue 10 years ago • 3 comments

While authenticating a user and fetching the access token, the functions currently do not accept parameters that override the initial config. This can be a hassle when you'd want to change the config at runtime. For example, if the specified redirect_uri in the config is www.my_redirect.com, I'd want to pass some data to the redirect handler, to allow dynamic behaviour, like so : www.my_redirect.com?q=runtimeValue which would help the redirect handler logic to behave differently.

These commits parameterize the functions to allow this behaviour.

caje731 avatar Apr 07 '15 10:04 caje731

ping @galen

caje731 avatar Apr 16 '15 11:04 caje731

I'm having the exact same issues, modifying the redirect_uri always gives a "Redirect URI doesn't match original redirect URI" error.

I'm having to work around this currently by saving the states in session before redirecting, and them reading them on return. Works, but not the most efficient way.

GreatPotato avatar Apr 22 '15 12:04 GreatPotato

@GreatPotato yes, that's the same issue I faced, which made me create this pull request.

@galen I'm pretty sure many others would have encountered this problem, working around it in their own ways. That's why I think it'll be nice to have this commit merged. Will ease a lot of similar problems.

caje731 avatar Apr 23 '15 15:04 caje731