[PR #207] [MERGED] feat: add google as auth provider **no schema change** #793

Closed
opened 2026-02-26 18:48:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/207
Author: @doug-andrade
Created: 6/13/2023
Status: Merged
Merged: 7/31/2023
Merged by: @Mythie

Base: feat/refreshHead: v2-google-auth


📝 Commits (4)

  • 2b84636 feat: google auth without schema change
  • d1bc948 clean up console.log() used for testing
  • 58baf5d Merge branch 'feat/refresh' into v2-google-auth
  • 918018c fix: improve typesafety

📊 Changes

8 files changed (+98 additions, -12 deletions)

View changed files

📝 .env.example (+4 -0)
📝 apps/web/process-env.d.ts (+3 -0)
📝 apps/web/src/components/forms/signin.tsx (+2 -2)
📝 packages/lib/next-auth/auth-options.ts (+56 -10)
packages/lib/tsconfig.json (+5 -0)
packages/lib/types/next-auth.d.ts (+23 -0)
📝 packages/tsconfig/process-env.d.ts (+3 -0)
📝 turbo.json (+2 -0)

📄 Description

Second Implementation of Google Auth Provider.

Please Note:
🚨 No Prisma Schema's were hurt in the making of this PR.

Configuration | Google Provider Reference

Create Credentials - https://console.developers.google.com/apis/credentials

The "Authorized redirect URIs" used when creating the credentials must include your full domain and end in the callback path.

Examples:

For production: https://{YOUR_DOMAIN}/api/auth/callback/google
For development: http://localhost:3000/api/auth/callback/google

Video:

https://www.loom.com/share/a6433ef73b0543909f82e6190cee13c5?sid=16ea86db-2fcd-4ebc-ae2a-a01fc6e641a5

Build Result:

web % npm run build

> @documenso/web@0.1.0 build
> next build

...
...
...

Route (app)                                Size     First Load JS
┌ ○ /                                      135 B          77.6 kB
├ λ /dashboard                             0 B                0 B
├ λ /documents                             0 B                0 B
├ λ /documents/[id]                        0 B                0 B
├ λ /settings                              0 B                0 B
├ λ /settings/billing                      0 B                0 B
├ λ /settings/password                     0 B                0 B
├ λ /settings/profile                      0 B                0 B
├ ○ /signin                                0 B                0 B
└ ○ /signup                                0 B                0 B
+ First Load JS shared by all              77.5 kB
  ├ chunks/7fd0f9f1-3fb3dc3e14815666.js    50.5 kB
  ├ chunks/9-cf592fc7a319a8e7.js           24.4 kB
  ├ chunks/main-app-9a6c377ca6c4fdfa.js    211 B
  └ chunks/webpack-813f0e9be6503a86.js     2.34 kB

Route (pages)                              Size     First Load JS
┌ ○ /404                                   178 B          86.7 kB
├ λ /api/auth/[...nextauth]                0 B            86.5 kB
├ λ /api/claim-plan                        0 B            86.5 kB
├ λ /api/document/create                   0 B            86.5 kB
├ λ /api/stripe/webhook                    0 B            86.5 kB
└ λ /api/trpc/[trpc]                       0 B            86.5 kB
+ First Load JS shared by all              86.5 kB
  ├ chunks/main-c32231f5001c0b96.js        84 kB
  ├ chunks/pages/_app-415a5670032b79f5.js  190 B
  └ chunks/webpack-813f0e9be6503a86.js     2.34 kB

ƒ Middleware                               22.9 kB

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)(Static)  automatically rendered as static HTML (uses no initial props)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/207 **Author:** [@doug-andrade](https://github.com/doug-andrade) **Created:** 6/13/2023 **Status:** ✅ Merged **Merged:** 7/31/2023 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `feat/refresh` ← **Head:** `v2-google-auth` --- ### 📝 Commits (4) - [`2b84636`](https://github.com/documenso/documenso/commit/2b84636993a01f99c03381eb8cad0900c22cab67) feat: google auth without schema change - [`d1bc948`](https://github.com/documenso/documenso/commit/d1bc948f3c1fe84e69b494a65177a1a67099650c) clean up console.log() used for testing - [`58baf5d`](https://github.com/documenso/documenso/commit/58baf5ddf4d07099bef75d25d94b1d7dfa10c8cf) Merge branch 'feat/refresh' into v2-google-auth - [`918018c`](https://github.com/documenso/documenso/commit/918018c7ca6dc7d6b9ec90a6edbe26dd4e2ba6f8) fix: improve typesafety ### 📊 Changes **8 files changed** (+98 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+4 -0) 📝 `apps/web/process-env.d.ts` (+3 -0) 📝 `apps/web/src/components/forms/signin.tsx` (+2 -2) 📝 `packages/lib/next-auth/auth-options.ts` (+56 -10) ➕ `packages/lib/tsconfig.json` (+5 -0) ➕ `packages/lib/types/next-auth.d.ts` (+23 -0) 📝 `packages/tsconfig/process-env.d.ts` (+3 -0) 📝 `turbo.json` (+2 -0) </details> ### 📄 Description ## Second Implementation of Google Auth Provider. >**Please Note:** >🚨 No Prisma Schema's were hurt in the making of this PR. ### **Configuration** | [Google Provider Reference](https://next-auth.js.org/providers/google) Create Credentials - https://console.developers.google.com/apis/credentials The "Authorized redirect URIs" used when creating the credentials must include your full domain and end in the callback path. **Examples:** >For production: `https://{YOUR_DOMAIN}/api/auth/callback/google` >For development: `http://localhost:3000/api/auth/callback/google` ### **Video:** https://www.loom.com/share/a6433ef73b0543909f82e6190cee13c5?sid=16ea86db-2fcd-4ebc-ae2a-a01fc6e641a5 ### **Build Result:** ```bash web % npm run build > @documenso/web@0.1.0 build > next build ... ... ... Route (app) Size First Load JS ┌ ○ / 135 B 77.6 kB ├ λ /dashboard 0 B 0 B ├ λ /documents 0 B 0 B ├ λ /documents/[id] 0 B 0 B ├ λ /settings 0 B 0 B ├ λ /settings/billing 0 B 0 B ├ λ /settings/password 0 B 0 B ├ λ /settings/profile 0 B 0 B ├ ○ /signin 0 B 0 B └ ○ /signup 0 B 0 B + First Load JS shared by all 77.5 kB ├ chunks/7fd0f9f1-3fb3dc3e14815666.js 50.5 kB ├ chunks/9-cf592fc7a319a8e7.js 24.4 kB ├ chunks/main-app-9a6c377ca6c4fdfa.js 211 B └ chunks/webpack-813f0e9be6503a86.js 2.34 kB Route (pages) Size First Load JS ┌ ○ /404 178 B 86.7 kB ├ λ /api/auth/[...nextauth] 0 B 86.5 kB ├ λ /api/claim-plan 0 B 86.5 kB ├ λ /api/document/create 0 B 86.5 kB ├ λ /api/stripe/webhook 0 B 86.5 kB └ λ /api/trpc/[trpc] 0 B 86.5 kB + First Load JS shared by all 86.5 kB ├ chunks/main-c32231f5001c0b96.js 84 kB ├ chunks/pages/_app-415a5670032b79f5.js 190 B └ chunks/webpack-813f0e9be6503a86.js 2.34 kB ƒ Middleware 22.9 kB λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) ○ (Static) automatically rendered as static HTML (uses no initial props) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 18:48:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#793
No description provided.