1

I am trying to create a Google Client ID to login with Gmail. While trying to create the login, I got below error.

As per the error, it is not ending with back slash. But still I am getting back slash error. Am I missing anything?

enter image description here

Pankaj
  • 9,749
  • 32
  • 139
  • 283

1 Answers1

1

It is clearly mentioned there

For use with requests from a browser. This is the origin URI of the client application. It can't contain a wildcard (http://*.example.com) or a path (http://example.com/subdir). If you're using a nonstandard port, you must include it in the origin URI.

If you want to add a new redirect URl, you need to add it in the text area "AUTHORIZED REDIRECT URI".
But in case of javascript origins, it is not for redirect uri, it contains origins where your app is allowed to access the Google APIs.(Origins cannot contain a wildcard or a path)
It requires your site address.
I myself use youtube api, have a look at this In this i have an error But when i add the site address only, then error is vanished. Because, javascript origins contains origins where your app is allowed to access the Google APIs. I.e; Your site address. enter image description here
Even we can mention the port as well. Path to sub directories is not allowed. enter image description here
So, since your application is hosted on localhost with port 1234, just add this to your javascript origins:

http://localhost:1234
Tahir Hussain Mir
  • 2,506
  • 2
  • 19
  • 26
  • I am still facing same issue: Origin URIs must not contain a path or end with "/" and I have added callback also – Pankaj Aug 13 '17 at 06:22
  • hey.You didn't get my answer. Sorry. You have to add the site address there only. Just add http://localhost:1234 @Pankaj – Tahir Hussain Mir Aug 13 '17 at 06:50
  • can u please suggest something here: https://stackoverflow.com/questions/45766977/get-email-address-from-socialite-while-login-with-gmail – Pankaj Aug 19 '17 at 04:59