[PR #4141] [MERGED] fix: small dx for device login #5216

Closed
opened 2026-03-13 12:14:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4141
Author: @himself65
Created: 8/21/2025
Status: Merged
Merged: 8/22/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/08/21/device-login-fix


📝 Commits (6)

📊 Changes

4 files changed (+65 additions, -53 deletions)

View changed files

📝 demo/nextjs/app/device/approve/page.tsx (+8 -7)
📝 demo/nextjs/components/sign-up.tsx (+5 -7)
📝 docs/content/docs/plugins/device-authorization.mdx (+46 -39)
📝 packages/cli/src/commands/login.ts (+6 -0)

📄 Description

Summary by cubic

Improves device login UX by fixing loading states in the demo and adding a helpful docs link to the CLI. Also streamlines sign-up redirect handling.

  • Bug Fixes

    • Split approve/deny transitions to prevent the wrong button from showing a spinner or being disabled.
    • Use search params + getCallbackURL for sign-up redirects and show a success toast.
  • DX

    • CLI login now prints a link to the device authorization docs after demo auth.

🔄 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/better-auth/better-auth/pull/4141 **Author:** [@himself65](https://github.com/himself65) **Created:** 8/21/2025 **Status:** ✅ Merged **Merged:** 8/22/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/08/21/device-login-fix` --- ### 📝 Commits (6) - [`9d6a233`](https://github.com/better-auth/better-auth/commit/9d6a23326cf2cbdb313abf0cf0d9a92a358438c7) fix: small dx for device login - [`40e0db8`](https://github.com/better-auth/better-auth/commit/40e0db88d49c81d47226d79b41839e3bd593db4b) fix: transition state - [`dbbb344`](https://github.com/better-auth/better-auth/commit/dbbb34438cc90433d661ec48958d391b8c6c3e0e) docs: update - [`8ce0cbb`](https://github.com/better-auth/better-auth/commit/8ce0cbbeceef433d0983533c2ea4506230043fbe) docs: update - [`45fd2ec`](https://github.com/better-auth/better-auth/commit/45fd2ecb19bcbd3ad0046e9d78020d98506ee0fa) docs: update code example - [`a4a88cc`](https://github.com/better-auth/better-auth/commit/a4a88cc247c3842ba2c4dfffd1f816fe3e630b0c) fix: code ### 📊 Changes **4 files changed** (+65 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `demo/nextjs/app/device/approve/page.tsx` (+8 -7) 📝 `demo/nextjs/components/sign-up.tsx` (+5 -7) 📝 `docs/content/docs/plugins/device-authorization.mdx` (+46 -39) 📝 `packages/cli/src/commands/login.ts` (+6 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Improves device login UX by fixing loading states in the demo and adding a helpful docs link to the CLI. Also streamlines sign-up redirect handling. - **Bug Fixes** - Split approve/deny transitions to prevent the wrong button from showing a spinner or being disabled. - Use search params + getCallbackURL for sign-up redirects and show a success toast. - **DX** - CLI login now prints a link to the device authorization docs after demo auth. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:14:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5216