Skip to content

poc: add Better Auth device authorization #463

Open
nhyiramante1 wants to merge 2 commits into
poc/better-auth-honofrom
poc/better-auth-device-authorization
Open

poc: add Better Auth device authorization #463
nhyiramante1 wants to merge 2 commits into
poc/better-auth-honofrom
poc/better-auth-device-authorization

Conversation

@nhyiramante1

Copy link
Copy Markdown
Contributor

Summary

  • Adds Better Auth's Device Authorization plugin
  • Adds a browser approval page with explicit Approve/Deny
  • Adds a separate-origin taskpane simulator
  • Polls for a Bearer token and verifies it through /api/protected

What This Proves

  • The taskpane can initiate login without a session cookie
  • The browser can authenticate and approve a public user code
  • The taskpane can receive a Bearer token by polling with its private device code
  • The token authenticates a protected Hono route

Out Of Scope

  • Production backend integration
  • Real Word taskpane integration
  • Google Docs integration
  • Production token storage

Test Plan

  • Start backend on port 3001
  • Start taskpane simulator on port 3002
  • Complete Google login and explicit approval
  • Confirm polling returns an access token
  • Confirm /api/protected returns the signed-in user using Bearer auth only

const content = document.getElementById("content");
const statusEl = document.getElementById("status");

function show(html) { content.innerHTML = html; }
@nhyiramante1 nhyiramante1 changed the base branch from main to poc/better-auth-hono June 11, 2026 21:34
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.

2 participants