Skip to main content

SemaphoreUI sign in with Google

Step 1: Modify SemaphoreUI Configuration

You need to modify the configuration file for SemaphoreUI, located at: /var/lib/docker/volumes/semaphore_semaphore_config/_data/config.json

Follow these steps:

  1. Open the configuration file (config.json) in your preferred text editor:

    sudo nano /var/lib/docker/volumes/semaphore_semaphore_config/_data/config.json
  2. Update the file with the following content, making sure to replace placeholder values (such as xxxxxxxxxxxxxxxxxxxxxxxxx) with the actual values specific to your environment.

{
"bolt": {
"host": "/var/lib/semaphore/database.boltdb"
},
"dialect": "bolt",
"tmp_path": "/tmp/semaphore",
"cookie_hash": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"cookie_encryption": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"access_key_encryption": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"oidc_providers": {
"google": {
"color": "red",
"icon": "google",
"display_name": "Sign in with Google",
"provider_url": "https://accounts.google.com",
"client_id": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"redirect_url": "https://automation.geargames.net/api/auth/oidc/google/redirect",
"username_claim": "email",
"name_claim": "name",
"email_claim": "email",
"scopes": ["openid", "profile", "email"],
"order": 2
}
}
}
  1. Save and exit the text editor. If you're using nano, press Ctrl + X, then press Y to confirm the save, and press Enter to exit.

Step 2: Restart Docker Compose

To apply the configuration changes, you need to restart the Docker Compose containers. Run the following commands:

docker compose down && docker compose up -d
  • docker compose down: This stops and removes the running containers.

  • docker compose up -d: This starts the containers in detached mode (in the background) using the updated configuration.

Step 3. Google Cloud setting

Authorized JavaScript origins

https://automation.geargames.net

Authorized redirect URIs

https://automation.geargames.net/api/auth/oidc/google/redirect
tip
  • Avoid Duplicate Email: The local user account should not have the same email address as a Google account. If this happens, you might face login or authentication issues.

  • Grant Admin Rights After Google Login: After logging in with Google, use an admin account to grant admin privileges to the Google user account that you want to assign admin rights.