-1

Please help me how do I fix the redirect URL in google API. See this screenshot:

enter image description here

I added Authorized JavaScript origins and Authorized redirect URIs but it's not working:

enter image description here

I would appreciate it if you helped me out with this.

enter image description here

Sorry for my ignorance

Thanks, LamNV11

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

The easiest way to solve the localhost issue with an OAuth provider is to use a service like http://vcap.me/ which resolves to 127.0.0.1 no matter what subdomain you use.

So add http://my-domain-name-goes-here.vcap.me/ to your Google OAuth settings and use that instead.

Note: 127.0.0.1 is not the same as localhost as far as an OAuth provider like Google is concerned and some OAuth providers don't allow localhost. Using vcap.me or one of the others solves this problem.

Ian Mercer
  • 38,490
  • 8
  • 97
  • 133
  • Sorry i until understand it. Could i must add : http://localhost:xxx.vcap.me in redirect url ? – Nguyen Lam Mar 15 '21 at 05:25
  • @NguyenLam you would put `http://xxx.vcap.me` or `https://xxx.vcap.me` in the redirect url and no matter what `xxx` is it will resolve to 127.0.0.1 through DNS. – Ian Mercer Mar 15 '21 at 15:05