Setting up Google OAuth
1. Create a Google Cloud project
- Go to console.cloud.google.com
- Create a new project or select an existing one
- Navigate to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Set application type to Web application
- Add the following to Authorized redirect URIs:
- Copy the Client ID and Client Secret
2. Configure in StartMyVPN
Navigate to Admin → Settings → Social and enter:| Field | Value |
|---|---|
| Google Client ID | From Google Cloud Console |
| Google Client Secret | From Google Cloud Console |
| Redirect URI | https://yourdomain.com/auth/google/callback |
| Enable Google Login | Toggle on |
.env:
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