PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Unsolved
produkt

Mar 10th, 2025 08:04 PM

I was messing around with enabling 2FA for my Wave login and when scanning the QR code to add to the authenticator app, it loads a strange image as the default logo. How do I change it?

Additionally, I was trying to add social login for Google. I created an OAuth2 consent screen, adding the client ID and secret to my .env, but when I click the button to login and it redirects to Google, I get this error:

Missing required parameter: client_id Learn more about this error
If you are a developer of this app, see error details.
Error 400: invalid_request

I copied and pasted the ID and secret, not sure why it's telling me missing client_id. I also show a green key in the /auth/setup page.

Report
1
bobbyiliev

Mar 11th, 2025 04:00 AM

Hey! 👋

Not 100% sure where the weird logo in the QR code is coming from. Can you share a screenshot of that?

About the Google Social login error, that error usually means your .env values aren’t loading properly.

Quick checklist:

  • Make sure .env has:
    GOOGLE_CLIENT_ID=xxx
    GOOGLE_CLIENT_SECRET=xxx
    
  • Run:
    php artisan config:clear && php artisan config:cache
    
  • Also make sure your redirect URI in Google Console matches exactly.

Also, the callback route specifically is available at auth/{driver}/callback:

php artisan route:list | grep call
  GET|HEAD   auth/{driver}/callback .............................................................. Devdojo\Auth › SocialController@callback

- Bobby

produkt

Mar 11th, 2025 04:46 AM

What is the correct redirect URI I’m supposed to enter in Google console? Just the base domain (https://example.com) or domain + callback route (https://example.com/auth/google/callback)?

And this is the authenticator image that loads IMG_9998.jpeg

I’ve made sure I have the GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in the .env, I’ve cleared and cached the config, I’ve changed the redirect URI to include the callback path, and it still gives Me the “missing client_id” error. Not sure what else to check.

Update: getting some strange behavior. When I log into my production server and run:

php artisan tinker
env('GOOGLE_CLIENT_ID')
= null

Then I run php artisan config:clear and check again and it shows the correct value. Then I run php artisan config:cache and it goes back to null. The auth flow tried between all steps fails every time with “missing client_id”

produkt

Mar 11th, 2025 10:25 AM

I changed APP_ENV to local on my production server so I can access the /auth/setup page and see if the providers settings is registering my key. It shows as detecting my key. I try to use the OAuth login and it works! Then I change the APP_ENV back to production and it’s broken again. I’m stumped.

When I cat bootstrap/cache/config.php in production, I can see that the GOOGLE_CLIENT_ID is set, but it still doesn't work. Running php artisan optimize:clear and php artisan cache:clear and php artisan config:clear doesn't fix anything. It only works when I change APP_ENV to local. Any ideas? I think this must be a bug in how the Auth package is handling local vs production environment because I've been tearing my hair out about this, it's not making any sense.

Could this have something to do with it? I'm not clever enough to figure it out but it shows some kind of behavior difference with Local or not. https://github.com/thedevdojo/auth/blob/main/src/Models/SocialProvider.php

protected function sushiShouldCache()
    {
        if (app()->isLocal()) {
            return false;
        }

        return true;
    }

Edit: I just put return false; at the top of the block and it works in production now. Is this a bug?

produkt

Mar 12th, 2025 11:01 AM

I was able to solve the issue after a lot of work. Instead of editing the SocialProvider.php which I knew was a hack, I had to delete storage/framework/cache/sushi-devdojo-auth-models-social-provider.sqlite which is persistent regardless of php artisan cache:clear and php artisan config:clear. I think that is misguided. There is no way to easily clear this cached file if your settings were incorrectly cached in production.

And regarding the image displayed, apparently my Authenticator app (Authy by Twilio) does its own image search on the internet and automatically tries to choose a logo for you based on the app name, which can produce pretty weird results if you're not a popular brand.

bobbyiliev

Mar 13th, 2025 02:19 AM

Happy to hear that you got it working! Thanks for pointing that bug out! I will have to investigate this and patch in the next release!