Skip to main content

OAuth providers

Configure provider credentials and understand how configured-only login and connection UI works.

SectionApplication / Authentication
PurposeAuthentication how-to
UpdatedJul 6, 2026
AuthorTemplate Maintainers
Versionv1.2.0
Reading time1 min

OAuth providers

The template uses Better Auth for authentication and supports several OAuth providers. Providers are registered only when their required environment variables are present.

Supported providers

ProviderEnvironment variables
GoogleGOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
GitHubGITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET
GitLabGITLAB_CLIENT_ID, GITLAB_CLIENT_SECRET
VKVK_CLIENT_ID
YandexYANDEX_CLIENT_ID, YANDEX_CLIENT_SECRET

Configure only the providers your service will use. Missing provider values keep that provider out of login, navigation, and account connection UI.

Redirect URLs

Provider dashboards must use redirect URLs that match the Better Auth callback for your application origin. Keep BETTER_AUTH_URL and NEXT_PUBLIC_APP_BASE_URL aligned with how users open the app.

Account connections

Users manage provider connections from /user/connections. The UI lists configured providers, supports linking missing connections, and prevents unsafe unlinking when it would leave the account without a reliable sign-in method.