Google authentication in php/laravel error: Error: invalid_request Invalid parameter value for redirect_uri: Missing authority

Viewed 993

I'm trying to build a simple authentication system in my php/laravel app with Google auth using Socialite package, based on this post, but I'm getting the following error on the browser:

enter image description here

my google console credentials are configured like this

enter image description here

and I get this error when I try to login using google, accessing the route '/redirect/google/' I've been searching for two days, but I haven't found any results containing 'missing authority'. what does missing authority mean? and how to fix this error?

1 Answers

Under "Authorized Redirect URIs", there is mention that the URL not contain relative paths. You would have to redirect directly to localhost:8000, not localhost:8000/callback/google/ ..

If you need to be at the relative path, then make your callback endpoint do whatever it needs to do at localhost:8000, then from there have it itself handle any further redirection.

Related