Eddi's avatar
Level 44

alternative for valet .test domain

Hello,

I am using laravel valet. Already I set valet to use .dev and .app domain in local environments but after facing problem with .dev and .app I changed valet domain to .test .

Today I want to use google api with socialite.

The problem is that when I want to create OAuth client ID in google, it does not accept ".test" domain for "Authorized redirect URIs". It says: Invalid Redirect: must end with a public top-level domain (such as .com or .org). Invalid Redirect: domain must be added to the authorized domains list before submitting.

While it accepts .test domain for "Authorized JavaScript origins" part!

I saw most of the tutorials when using socialite and google api they set these in google console.

http://localhost:8000

and

http://localhost:8000/callback/google

and google accepts them without problem with domain and generate the key and secret but I am not using mamp and I am going to continue with valet.

I would be so thankful if you guide me about what is the alternative domain for .test which works fine in valet and also google accepts it?

Best Regards,

0 likes
3 replies
ejdelmonico's avatar

Personally, I have not faced your specific issue but I found a =n article that addresses' the issue. Hopefully, it will help you: article

2 likes
musa11971's avatar

You can try using the valet share command. That'll generate an ngrok URL that can be approached from anywhere, so that should work with the Google API.

1 like

Please or to participate in this conversation.