authentication - Custom local URL results in redirect_uri_mismatch -


i using custom local url development of project authenticates both google , adwords using oauth2.

the entry in /etc/hosts file looks like:

127.0.0.1 sub.example.dev:3001

in google cloud platform console have oauth 2.0 client id setup with:

  • type: web application
  • authorized javascript origin: http://sub.example.dev:3001
  • authorized redirect uris:
    • http://sub.example.dev:3001/auth/adwords/callback
    • http://sub.example.dev:3001/auth/google/callback

i authenticate with both google , adwords separately. using localhost:3001 instead of custom url working both google , adwords. after switching custom local url google auth still works, when try authenticate adwords redirect_uri_mismatch error.

the error page tells me "the redirect uri in request, sub.example.dev:3001/auth/adwords/callback, not match ones authorized oauth client." uri reported here same have authorized redirect uri (minus protocol).

why work google oauth, not adwords? how can custom local redirect url work adwords oauth?

thanks!

i found issue, , there hint in question itself. redirect url pass during oauth flow needs contain protocol , had missed in config.

the redirect url passing in oauth flow sub.example.dev:3001/auth/adwords/callback

i changed http://sub.example.dev:3001/auth/adwords/callback , works! :d


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -