https://sonarly.com/issue/26553?type=bug Self-hosted users configuring `AUTH_GOOGLE_APIS_CALLBACK_URL` with an incorrect path (e.g., `/auth/google/apis/callback` instead of `/auth/google-apis/get-access-token`) get a 404 page after Google OAuth consent because no NestJS route handles the misconfigured path, and the config variable lacks validation unlike its peer variables. Fix: Two changes that work together to prevent the misconfiguration that caused this issue: **1. `config-variables.ts` — Add validation decorators to `AUTH_GOOGLE_APIS_CALLBACK_URL`** Added `@IsUrl({ require_tld: false, require_protocol: true })` and `@IsOptional()` to match the validation pattern used by peer variables (`AUTH_GOOGLE_CALLBACK_URL`, `AUTH_MICROSOFT_CALLBACK_URL`, `AUTH_MICROSOFT_APIS_CALLBACK_URL`). This catches malformed URLs at startup when the variable is explicitly set, while `@IsOptional()` allows omitting it entirely (so the fallback can work). **2. `google-apis-oauth-common.auth.strategy.ts` — Add SERVER_URL fallback** When `AUTH_GOOGLE_APIS_CALLBACK_URL` is not set, the strategy now auto-computes the correct callback URL from `SERVER_URL` (which defaults to `http://localhost:3000`). The fallback path `/auth/google-apis/get-access-token` matches the NestJS controller route exactly. This eliminates the most common misconfiguration scenario — users who set `SERVER_URL` correctly no longer need to also set `AUTH_GOOGLE_APIS_CALLBACK_URL`. Together these changes: - **Prevent invalid URLs**: `@IsUrl` catches malformed URLs at server startup - **Eliminate the need for manual configuration**: The fallback auto-computes from `SERVER_URL` - **Maintain backward compatibility**: Existing deployments with `AUTH_GOOGLE_APIS_CALLBACK_URL` set correctly continue to work unchanged
The #1 Open-Source CRM
🌐 Website · 📚 Documentation · Roadmap ·
Discord ·
Figma
Installation
See: 🚀 Self-hosting 🖥️ Local Setup
Why Twenty
We built Twenty for three reasons:
CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.
A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.
We believe in open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.
What You Can Do With Twenty
Please feel free to flag any specific needs you have by creating an issue.
Below are a few features we have implemented to date:
- Personalize layouts with filters, sort, group by, kanban and table views
- Customize your objects and fields
- Create and manage permissions with custom roles
- Automate workflow with triggers and actions
- Emails, calendar events, files, and more
Personalize layouts with filters, sort, group by, kanban and table views
Customize your objects and fields
Create and manage permissions with custom roles
Automate workflow with triggers and actions
Emails, calendar events, files, and more
Stack
- TypeScript
- Nx
- NestJS, with BullMQ, PostgreSQL, Redis
- React, with Jotai, Linaria and Lingui
Thanks
Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).
Join the Community
- Star the repo
- Subscribe to releases (watch -> custom -> releases)
- Follow us on Twitter or LinkedIn
- Join our Discord
- Improve translations on Crowdin
- Contributions are, of course, most welcome!




