mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-04 21:03:01 +01:00
1.2 KiB
1.2 KiB
Setting up Google Auth
To set up your self-hosted Khoj with Google Auth, you need to create a project in the Google Cloud Console and enable the Google Auth API.
To implement this, you'll need to:
- You must use the
python
package or build from source, because you'll need to install additional packages for the google auth libraries (prod
). The syntax to install the right packages is
pip install khoj-assistant[prod]
-
Create authorization credentials for your application.
-
Go to your Google cloud console and create a configuration like below for the relevant
OAuth 2.0 Client IDs
project: -
Configure these environment variables:
GOOGLE_CLIENT_SECRET
, andGOOGLE_CLIENT_ID
. You can find these values in the Google cloud console, in the same place where you configured the authorized origins and redirect URIs.
That's it! That should be all you have to do. Now, when you reload Khoj without --anonymous-mode
, you should be able to use your Google account to sign in.