GOOGLE_AUTO_REGISTER not working #2902

Closed
opened 2026-02-05 05:41:02 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @BeyonityEurope on GitHub (Jul 13, 2022).

Describe the Bug

Users are not getting autoregistered when they press "login with google" with registration turned off.
The error is in german but it says: "This Google account is not assigned to a user yet"
Laravel.log

Steps to Reproduce

  1. setup google auth
  2. Enable GOOGLE_AUTO_CONFIRM_EMAIL=true and GOOGLE_AUTO_REGISTER=true in .env
  3. Try to login with a not registered google account

Expected Behaviour

When user is not registered and successfully logs in with google it should create an account for the user (as per documentation

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

22.06.2

PHP Version

No response

Hosting Environment

Ubuntu 22.04

Originally created by @BeyonityEurope on GitHub (Jul 13, 2022). ### Describe the Bug Users are not getting autoregistered when they press "login with google" with registration turned off. The error is in german but it says: "This Google account is not assigned to a user yet" [Laravel.log](https://github.com/BookStackApp/BookStack/files/9101749/bookstackGoogleAutoRegister.txt) ### Steps to Reproduce 0. setup google auth 1. Enable GOOGLE_AUTO_CONFIRM_EMAIL=true and GOOGLE_AUTO_REGISTER=true in .env 2. Try to login with a not registered google account ### Expected Behaviour When user is not registered and successfully logs in with google it should create an account for the user ([as per documentation](https://www.bookstackapp.com/docs/admin/third-party-auth/#google) ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version 22.06.2 ### PHP Version _No response_ ### Hosting Environment Ubuntu 22.04
OVERLORD added the 🐛 Bug label 2026-02-05 05:41:02 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 13, 2022):

Hi @begehungen,

Please could you share the exact output of running the following command?:

ls -alh /var/www/bookstack/bootstrap/cache

And also the exact output of running this exact command:

cat /var/www/bookstack/.env | grep -n GOOGLE_AUTO
@ssddanbrown commented on GitHub (Jul 13, 2022): Hi @begehungen, Please could you share the exact output of running the following command?: ```bash ls -alh /var/www/bookstack/bootstrap/cache ``` And also the exact output of running this exact command: ```bash cat /var/www/bookstack/.env | grep -n GOOGLE_AUTO ```
Author
Owner

@BeyonityEurope commented on GitHub (Jul 13, 2022):

@ssddanbrown
grafik

@BeyonityEurope commented on GitHub (Jul 13, 2022): @ssddanbrown ![grafik](https://user-images.githubusercontent.com/60754810/178752102-63781604-8c3b-4758-84c1-7c7431cccdd8.png)
Author
Owner

@ssddanbrown commented on GitHub (Jul 13, 2022):

Thanks @begehungen,

It looks like an optimize/cache command has been run at some stage (29th June). This prevents config changes being active until the cache is cleared.
Please run the following command to clear this cache:

rm /var/www/bookstack/bootstrap/cache/config.php
@ssddanbrown commented on GitHub (Jul 13, 2022): Thanks @begehungen, It looks like an optimize/cache command has been run at some stage (29th June). This prevents config changes being active until the cache is cleared. Please run the following command to clear this cache: ```bash rm /var/www/bookstack/bootstrap/cache/config.php ```
Author
Owner

@BeyonityEurope commented on GitHub (Jul 13, 2022):

thanks a lot! I will try that. I thought I cleared the cache with sudo php artisan cache:clear

@BeyonityEurope commented on GitHub (Jul 13, 2022): thanks a lot! I will try that. I thought I cleared the cache with `sudo php artisan cache:clear`
Author
Owner

@ssddanbrown commented on GitHub (Jul 13, 2022):

I thought I cleared the cache with sudo php artisan cache:clear

That does a different cache. There is the php artisan config:clear command which effectively does the same rm command as above.

@ssddanbrown commented on GitHub (Jul 13, 2022): > I thought I cleared the cache with `sudo php artisan cache:clear` That does a different cache. There is the `php artisan config:clear` command which effectively does the same `rm` command as above.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2902