Migrate from LDAP to Google SSO #537

Closed
opened 2026-02-04 20:51:29 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @tuaris on GitHub (Dec 28, 2017).

I currently have LDAP authentication enabled. I would like to switch it to use Google SSO instead. What's the best way to migrate without loosing content and making sure existing LDAP accounts can be 'claimed' (or linked) back to the Google ones?

Originally created by @tuaris on GitHub (Dec 28, 2017). I currently have LDAP authentication enabled. I would like to switch it to use Google SSO instead. What's the best way to migrate without loosing content and making sure existing LDAP accounts can be 'claimed' (or linked) back to the Google ones?
OVERLORD added the Question label 2026-02-04 20:51:29 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Dec 29, 2017):

Hi @tuaris, I'd be happy to help you through this, There are some caveats to be aware of.

You can run Google login alongside LDAP login for a while as you migrate.
Once set up all existing users can go to their profile settings, scroll to the bottom and select 'Link account'. This will allow them to sign into their current account via Google.

Currently, Google login has to be ran alongside ldap or email-login. While LDAP and Google sign-in are used users won't be able to register into the BookStack instance via Google since this is done on the register page which is disabled when LDAP is used.

If you know the GooglePlus ID's of your users you could manually link GooglePlus accounts to users directly via the database by updating the social_accounts table. Here's an example of what this table looks like for reference:

id user_id driver driver_id avatar created_at updated_at
1 1 google 102972469186357098848 2017-09-14 19:15:51 2017-09-14 19:15:51
5 1 azure c09588c1-b801-4905-9b99-bcc83b731d24 2017-10-01 12:13:34 2017-10-01 12:13:34
6 1 okta 00u9sm7jdv9COtIRL0h7 2017-12-09 13:25:31 2017-12-09 13:25:31
@ssddanbrown commented on GitHub (Dec 29, 2017): Hi @tuaris, I'd be happy to help you through this, There are some caveats to be aware of. You can run Google login alongside LDAP login for a while as you migrate. Once set up all existing users can go to their profile settings, scroll to the bottom and select 'Link account'. This will allow them to sign into their current account via Google. Currently, Google login has to be ran alongside ldap or email-login. While LDAP **and** Google sign-in are used users won't be able to register into the BookStack instance via Google since this is done on the register page which is disabled when LDAP is used. If you know the GooglePlus ID's of your users you could manually link GooglePlus accounts to users directly via the database by updating the `social_accounts` table. Here's an example of what this table looks like for reference: <table border=1> <tr> <td bgcolor=silver class='medium'>id</td> <td bgcolor=silver class='medium'>user_id</td> <td bgcolor=silver class='medium'>driver</td> <td bgcolor=silver class='medium'>driver_id</td> <td bgcolor=silver class='medium'>avatar</td> <td bgcolor=silver class='medium'>created_at</td> <td bgcolor=silver class='medium'>updated_at</td> </tr> <tr> <td class='normal' valign='top'>1</td> <td class='normal' valign='top'>1</td> <td class='normal' valign='top'>google</td> <td class='normal' valign='top'>102972469186357098848</td> <td class='normal' valign='top'></td> <td class='normal' valign='top'>2017-09-14 19:15:51</td> <td class='normal' valign='top'>2017-09-14 19:15:51</td> </tr> <tr> <td class='normal' valign='top'>5</td> <td class='normal' valign='top'>1</td> <td class='normal' valign='top'>azure</td> <td class='normal' valign='top'>c09588c1-b801-4905-9b99-bcc83b731d24</td> <td class='normal' valign='top'></td> <td class='normal' valign='top'>2017-10-01 12:13:34</td> <td class='normal' valign='top'>2017-10-01 12:13:34</td> </tr> <tr> <td class='normal' valign='top'>6</td> <td class='normal' valign='top'>1</td> <td class='normal' valign='top'>okta</td> <td class='normal' valign='top'>00u9sm7jdv9COtIRL0h7</td> <td class='normal' valign='top'></td> <td class='normal' valign='top'>2017-12-09 13:25:31</td> <td class='normal' valign='top'>2017-12-09 13:25:31</td> </tr> </table>
Author
Owner

@ssddanbrown commented on GitHub (May 27, 2018):

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please comment and this can be reopened if required.

@ssddanbrown commented on GitHub (May 27, 2018): Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please comment and this can be reopened if required.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#537