Google domain authentication is not working with bookstackapp integration #405

Closed
opened 2026-02-04 19:32:27 +03:00 by OVERLORD · 15 comments
Owner

Originally created by @praneethsharma on GitHub (Aug 15, 2017).

This is not a bug, rather i did not find a discussion forum to get help with this issue

  • BookStack Version: v0.16.2
  • PHP Version: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
  • MySQL Version: Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper
  • BookstackApp Installed on Ubuntu 16.04.2 LTS

I have followed the instructions provided in https://www.bookstackapp.com/docs/admin/social-auth/ to integrate with google.

when i open bookstackapp, i can see "Login with Google" option. But when i click that it throws message "No action defined".

But in Authorized redirect URIs, I have provided the URI http://abc.com/login/service/google/callback
http://abc.com/register/service/google/callback

screen shot 2017-08-15 at 12 17 28 pm

Could i get some assistance to resolve this this issue.

Originally created by @praneethsharma on GitHub (Aug 15, 2017). ### This is not a bug, rather i did not find a discussion forum to get help with this issue * BookStack Version: v0.16.2 * PHP Version: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS ) * MySQL Version: Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper * BookstackApp Installed on Ubuntu 16.04.2 LTS I have followed the instructions provided in https://www.bookstackapp.com/docs/admin/social-auth/ to integrate with google. when i open bookstackapp, i can see "Login with Google" option. But when i click that it throws message "No action defined". But in Authorized redirect URIs, I have provided the URI http://abc.com/login/service/google/callback http://abc.com/register/service/google/callback <img width="264" alt="screen shot 2017-08-15 at 12 17 28 pm" src="https://user-images.githubusercontent.com/2536273/29305135-9471b638-81b4-11e7-8b71-7349f0f05544.png"> Could i get some assistance to resolve this this issue.
OVERLORD added the 🐕 Support label 2026-02-04 19:32:27 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 17, 2017):

Hi @praneethsharma,

Looking at the notification shown it would suggest the request to google and the callback redirect is working fine.

The only thing I can imagine might be wrong here is that sessions are not saving.

Are normal login methods working okay and are you able to upload images to pages?
Have you made any changes to any variables in .env starting with SESSION_?
Did you set the permissions of the storage/ folder to be writable by the server?

In the .env file you could try changing SESSION_DRIVER=file to SESSION_DRIVER=database to see if that helps at all.

@ssddanbrown commented on GitHub (Aug 17, 2017): Hi @praneethsharma, Looking at the notification shown it would suggest the request to google and the callback redirect is working fine. The only thing I can imagine might be wrong here is that sessions are not saving. Are normal login methods working okay and are you able to upload images to pages? Have you made any changes to any variables in `.env` starting with `SESSION_`? Did you set the permissions of the `storage/` folder to be writable by the server? In the `.env` file you could try changing `SESSION_DRIVER=file` to `SESSION_DRIVER=database` to see if that helps at all.
Author
Owner

@praneethsharma commented on GitHub (Sep 2, 2017):

Hi @ssddanbrown ,

Sorry for late response. I tried changing SESSION_DRIVER=file to SESSION_DRIVER=database and now i was redirected to google login page and after entering credentials, i got below error message. I believe there is an issue with callback URL which gave me below error message.

screen shot 2017-09-02 at 6 17 59 pm

Request URL:http://abc.com/login/service/google/callback?state=Sz08TS8opjwtsPnrOJE8YQFru2D4F4ClZpkrlTpw&code=4/Td4ffvuLK1Du5FGDkdGA7vYNBXxTzltxWzKlinz-qrE&authuser=0&hd=abc.com&session_state=02f9479a8b048174c347a0e7d38bbfe37bbfb1dd..0f69&prompt=none

I created a new API, after updating the credentials, i got new error that my google account is not associated with any users.

Does this mean, if i am part of a custom domain under google, then i need to do Domain verification in APIs & Auth and google mail.

screen shot 2017-09-02 at 8 00 31 pm
@praneethsharma commented on GitHub (Sep 2, 2017): Hi @ssddanbrown , Sorry for late response. I tried changing `SESSION_DRIVER=file` to `SESSION_DRIVER=database` and now i was redirected to google login page and after entering credentials, i got below error message. I believe there is an issue with callback URL which gave me below error message. <img width="763" alt="screen shot 2017-09-02 at 6 17 59 pm" src="https://user-images.githubusercontent.com/2536273/29995609-252c7ab4-900b-11e7-8d5e-75af61b4d3c5.png"> Request URL:http://abc.com/login/service/google/callback?state=Sz08TS8opjwtsPnrOJE8YQFru2D4F4ClZpkrlTpw&code=4/Td4ffvuLK1Du5FGDkdGA7vYNBXxTzltxWzKlinz-qrE&authuser=0&hd=abc.com&session_state=02f9479a8b048174c347a0e7d38bbfe37bbfb1dd..0f69&prompt=none I created a new API, after updating the credentials, i got new error that my google account is not associated with any users. Does this mean, if i am part of a custom domain under google, then i need to do Domain verification in APIs & Auth and google mail. <img width="515" alt="screen shot 2017-09-02 at 8 00 31 pm" src="https://user-images.githubusercontent.com/2536273/29996290-ac4c7590-9019-11e7-8208-9707b316b180.png">
Author
Owner

@ssddanbrown commented on GitHub (Sep 2, 2017):

@praneethsharma Thanks for the extra information.

To find the issue behind that message, to give a better idea of what the issue could be, the instructions here can be followed to view the error message in more detail:

https://www.bookstackapp.com/docs/admin/debugging/

@ssddanbrown commented on GitHub (Sep 2, 2017): @praneethsharma Thanks for the extra information. To find the issue behind that message, to give a better idea of what the issue could be, the instructions here can be followed to view the error message in more detail: https://www.bookstackapp.com/docs/admin/debugging/
Author
Owner

@praneethsharma commented on GitHub (Oct 3, 2017):

@ssddanbrown , today i tried integrating with slack, got stuck at same point,

screen shot 2017-10-03 at 5 42 15 pm

So made "APP_DEBUG=true" in .env file.

then tried loading the page. i could see few options enabled.

screen shot 2017-10-03 at 5 45 06 pm

screen shot 2017-10-03 at 5 46 27 pm

screen shot 2017-10-03 at 5 46 40 pm

laravel.log looks like this, not sure what to look at now. could you please check.

#48 {main} #47 /var/www/bookstack/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #46 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Re quest)) #45 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(149): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #44 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))

@praneethsharma commented on GitHub (Oct 3, 2017): @ssddanbrown , today i tried integrating with slack, got stuck at same point, <img width="482" alt="screen shot 2017-10-03 at 5 42 15 pm" src="https://user-images.githubusercontent.com/2536273/31124475-3c768402-a862-11e7-8446-fdee93d98108.png"> So made "APP_DEBUG=true" in .env file. then tried loading the page. i could see few options enabled. <img width="1273" alt="screen shot 2017-10-03 at 5 45 06 pm" src="https://user-images.githubusercontent.com/2536273/31124574-a82059b2-a862-11e7-952e-e7748038717d.png"> ![screen shot 2017-10-03 at 5 46 27 pm](https://user-images.githubusercontent.com/2536273/31124617-d95ae2cc-a862-11e7-9820-e315a31b3aae.png) ![screen shot 2017-10-03 at 5 46 40 pm](https://user-images.githubusercontent.com/2536273/31124624-df36ceae-a862-11e7-9b06-e285a8cd5b07.png) laravel.log looks like this, not sure what to look at now. could you please check. `#48 {main} #47 /var/www/bookstack/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #46 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Re quest)) #45 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(149): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #44 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) `
Author
Owner

@ssddanbrown commented on GitHub (Oct 3, 2017):

Hi @praneethsharma, That error notification is saying you have not linked the account to a user. If your profile already exists login > Go to profile settings > At the bottom link your Slack account.

If your login does not already exist go to the 'Sign-up' page and select Slack there instead of the login page.

@ssddanbrown commented on GitHub (Oct 3, 2017): Hi @praneethsharma, That error notification is saying you have not linked the account to a user. If your profile already exists login > Go to profile settings > At the bottom link your Slack account. If your login does not already exist go to the 'Sign-up' page and select Slack there instead of the login page.
Author
Owner

@praneethsharma commented on GitHub (Oct 6, 2017):

Hi @ssddanbrown slack is also integrated with google. So slack is also depended on google's authentication. I will switch back to google and update you.

@praneethsharma commented on GitHub (Oct 6, 2017): Hi @ssddanbrown slack is also integrated with google. So slack is also depended on google's authentication. I will switch back to google and update you.
Author
Owner

@praneethsharma commented on GitHub (Oct 6, 2017):

Its the same issue. Trying to understand this, according to the social authentication documentation, we are creating google+ API.

But i have custom domain in google. In that case, should i create any other API, so that all the members of domain will be able to login to bookstackapp with domain credentials ?

I am not a g-suite admin, so is that a restriction ? I suspect this because, i am able to create a project, create API and apply credentials in .env file. But i see no users are linked to this account. Does this mean, no users are part of the project i created ?

screen shot 2017-10-06 at 8 23 00 pm

@praneethsharma commented on GitHub (Oct 6, 2017): Its the same issue. Trying to understand this, according to the social authentication documentation, we are creating google+ API. But i have custom domain in google. In that case, should i create any other API, so that all the members of domain will be able to login to bookstackapp with domain credentials ? I am not a g-suite admin, so is that a restriction ? I suspect this because, i am able to create a project, create API and apply credentials in .env file. But i see no users are linked to this account. Does this mean, no users are part of the project i created ? ![screen shot 2017-10-06 at 8 23 00 pm](https://user-images.githubusercontent.com/2536273/31283793-380724de-aad4-11e7-9aaa-14f4b00f85fd.png)
Author
Owner

@ssddanbrown commented on GitHub (Oct 6, 2017):

@praneethsharma Any users with a google account will be able to use your auth unless they are part of a business account where the admin has disabled this.

The screenshots above still show the login page. The error message shows the auth method is talking to the external service okay.

Can you go to /register instead of /login and try your slack/google auth option from there? You may have to enable registration in the BookStack settings.

@ssddanbrown commented on GitHub (Oct 6, 2017): @praneethsharma Any users with a google account will be able to use your auth unless they are part of a business account where the admin has disabled this. The screenshots above still show the login page. The error message shows the auth method is talking to the external service okay. Can you go to `/register` instead of `/login` and try your slack/google auth option from there? You may have to enable registration in the BookStack settings.
Author
Owner

@praneethsharma commented on GitHub (Oct 19, 2017):

I tried adding /register instead of /login, i got "registrations are disabled" message.

Yes @ssddanbrown , its part of a business account. I will get admin privileges and try debugging this. Will update here incase of any queries.

@praneethsharma commented on GitHub (Oct 19, 2017): I tried adding /register instead of /login, i got "registrations are disabled" message. Yes @ssddanbrown , its part of a business account. I will get admin privileges and try debugging this. Will update here incase of any queries.
Author
Owner

@obeardly commented on GitHub (Dec 19, 2017):

@praneethsharma Did you ever get this working? I've had the worst luck at getting Bookstack to authenticate against anything but internal authentication.

slack_bookstack_error

@obeardly commented on GitHub (Dec 19, 2017): @praneethsharma Did you ever get this working? I've had the worst luck at getting Bookstack to authenticate against anything but internal authentication. ![slack_bookstack_error](https://user-images.githubusercontent.com/12804968/34173146-83a81ace-e4c2-11e7-8b5c-21d514eda227.png)
Author
Owner

@obeardly commented on GitHub (Dec 19, 2017):

@praneethsharma @ssddanbrown I got this working via Slack. I followed the instructions on the page for Third Party Authentication. Then I enabled registration and limited it to my domains. I had each of my users to the the Bookstack registration URL, and register with Slack. I'm off to the races. I hope this will work for you too.

@obeardly commented on GitHub (Dec 19, 2017): @praneethsharma @ssddanbrown I got this working via Slack. I followed the instructions on the page for [Third Party Authentication](https://www.bookstackapp.com/docs/admin/third-party-auth/). Then I enabled registration and limited it to my domains. I had each of my users to the the Bookstack registration URL, and register with Slack. I'm off to the races. I hope this will work for you too.
Author
Owner

@praneethsharma commented on GitHub (Dec 19, 2017):

@obeardly I tried integrating with Slack, but my slack account was in turn depending on google authentication. So it got back fix google domain authentication. As i did not get G-Suite admin privilege, i couldn't test further.

@ssddanbrown sorry, i should have informed about this. I will not be able to test further as i am not a domain administrator. As @obeardly confirmed that integration with Slack is working, i think we can close this issue.

@praneethsharma commented on GitHub (Dec 19, 2017): @obeardly I tried integrating with Slack, but my slack account was in turn depending on google authentication. So it got back fix google domain authentication. As i did not get G-Suite admin privilege, i couldn't test further. @ssddanbrown sorry, i should have informed about this. I will not be able to test further as i am not a domain administrator. As @obeardly confirmed that integration with Slack is working, i think we can close this issue.
Author
Owner

@praneethsharma commented on GitHub (Nov 21, 2018):

Hey All,

Just wanted to update that i got this work.

Went to my user account settings and i clicked on "Connect Account" option under. So after that i logging out and tried logging in via google account and it worked. But as admin, i am not able to do that for other users.

For now when i create a user, they have to login with password and then go to settings and they are able to link their google account. However, is there a way, i can force all the users in the domain to use google authentication, without they login with password ?

screenshot 2018-11-21 at 9 02 37 am

@praneethsharma commented on GitHub (Nov 21, 2018): Hey All, Just wanted to update that i got this work. Went to my user account settings and i clicked on "Connect Account" option under. So after that i logging out and tried logging in via google account and it worked. But as admin, i am not able to do that for other users. For now when i create a user, they have to login with password and then go to settings and they are able to link their google account. However, is there a way, i can force all the users in the domain to use google authentication, without they login with password ? ![screenshot 2018-11-21 at 9 02 37 am](https://user-images.githubusercontent.com/2536273/48817405-513cf380-ed6c-11e8-8c40-beb56b910f2a.png)
Author
Owner

@nekromoff commented on GitHub (Dec 17, 2018):

I did limit login to social accounts only via editing login/register templates and removing standard user+password form parts. Thus only social login option is left.

@nekromoff commented on GitHub (Dec 17, 2018): I did limit login to social accounts only via editing login/register templates and removing standard user+password form parts. Thus only social login option is left.
Author
Owner

@praneethsharma commented on GitHub (Dec 27, 2018):

Got it. Thanks @nekromoff

@praneethsharma commented on GitHub (Dec 27, 2018): Got it. Thanks @nekromoff
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#405