Troubles with Oauth2 Authorization code grant
I have problems with Oauth2 setup. I'm experimenting on my local machine. When I click a link to authorize my application I get such error: Error: Invalid authorization request
And authorization url is: https://app.optimizely.com/oauth2/authorize?client
However if I change response_type from 'code' to 'token' everything works fine. What am I missing?
Thanks for reaching out!
This error is most likely due to the fact that you are using an HTTP redirect URI. If you are using an authorization code grant, insecure URLs such as those starting with http:// will be rejected.
You can find out more about it by taking a look at the Authorization parameters in the REST API reference page.
With the response_type set to code, the redirect URI must be an HTTPS URI. To fix the issue, you need to change the redirect URI to an HTTPS one. You can change the redirect URI by following this link.
Let me know if that fixes the issue!