Skip to content

feat(auth): make the deployed app OAuth-only - #78

Merged
finallyjay merged 2 commits into
mainfrom
feat/oauth-only-sign-in
Oct 9, 2026
Merged

finallyjay merged 2 commits into
mainfrom
feat/oauth-only-sign-in

Conversation

@finallyjay

Copy link
Copy Markdown
Owner

Summary

Part of #74: the daily.dev team suggested dropping the "paste an API token" fallback so personal tokens don't pass through a hosted server.

  • Production is OAuth-only. The token form and POST /api/auth are gated on import.meta.env.DEV. In the production build the form isn't rendered and POST /api/auth compiles down to return json({ error: "Not found" }, 404); the token validation code is gone from the bundle (checked in .vercel/output).
  • Kept for pnpm dev. daily.dev rejects every loopback redirect URI, so OAuth can't complete locally. Pasting a token is the only way to try real mode on a dev server, and the e2e suite (which runs on the dev server) keeps covering it.
  • Without OAuth credentials, a deployment shows only the demo. The ?login=unavailable message now points to the demo instead of the token.
  • README, CONTRIBUTING and .env.example describe the new setup.

Test plan

  • pnpm build, then inspected the bundle: no token form markup, POST /api/auth → 404
  • pnpm lint, pnpm format:check, pnpm test (28 passed; the token tests still run against the dev server)

🤖 Generated with Claude Code

Suggested by the daily.dev team: now that Sign in with daily.dev works,
personal API tokens shouldn't pass through a hosted server.

- the "paste an API token" form and POST /api/auth only exist under
  `pnpm dev` (import.meta.env.DEV), where they stay useful because
  daily.dev's OAuth can't redirect to localhost; production builds drop
  the code and POST /api/auth answers 404
- without OAuth configured, a deployment only offers the demo
- README, CONTRIBUTING and .env.example updated

Part of #74.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-dev-roulette Ready Ready Preview Oct 9, 2026 12:21pm UTC

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fd4f77f0-6969-4c07-b7a1-8c785f5a2f50

📥 Commits

Reviewing files that changed from the base of the PR and between d41c750 and d7cf6fc.


📒 Files selected for processing (6)
  • .env.example
  • CONTRIBUTING.md
  • README.md
  • src/pages/api/auth/index.ts
  • src/pages/index.astro
  • tests/e2e/auth.spec.ts


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@finallyjay
finallyjay merged commit 0613b58 into main Oct 9, 2026
7 checks passed
@finallyjay
finallyjay deleted the feat/oauth-only-sign-in branch October 9, 2026 12:22

This branch was successfully deployed

1 active deployment
Preview — d7cf6fca Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant