Skip to main content
StartMyVPN supports Google OAuth as an optional login method. When enabled, users can sign in with their Google account instead of a password.

Setting up Google OAuth

1. Create a Google Cloud project

  1. Go to console.cloud.google.com
  2. Create a new project or select an existing one
  3. Navigate to APIs & Services → Credentials
  4. Click Create Credentials → OAuth client ID
  5. Set application type to Web application
  6. Add the following to Authorized redirect URIs:
    https://yourdomain.com/auth/google/callback
    
  7. Copy the Client ID and Client Secret

2. Configure in StartMyVPN

Navigate to Admin → Settings → Social and enter:
FieldValue
Google Client IDFrom Google Cloud Console
Google Client SecretFrom Google Cloud Console
Redirect URIhttps://yourdomain.com/auth/google/callback
Enable Google LoginToggle on
Or set in .env:
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
GOOGLE_REDIRECT_URI=https://yourdomain.com/auth/google/callback

How it works

  • A Sign in with Google button appears on the login and registration pages when enabled
  • If a user signs in with Google and no account exists with that email, a new account is created automatically
  • If an account already exists with the same email, the Google account is linked to it
  • Email verification is skipped for Google-authenticated accounts

Disabling Google login

Toggle Enable Google Login to off in Admin → Settings → Social. The sign-in button will be removed from public pages immediately.