fix(auth): validate token on login by hitting /users/me
The previous flow pinged the unauthenticated /health endpoint, so a
bad or expired token sailed through and showed "Logged in" — only to
fail on the next call with 401.
Now login does an authenticated GET /users/me. 401/403 returns an
error without overwriting the saved config; success greets the user
by name. Network errors still fall through with a warning.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SHA:
0403191a92ce538cd3469f97437e64e9e92c440b
Author:
Cole Christensen <cole.christensen@gmail.com>
Date:
2026-05-20 17:09
Parents:
0c8d1b0
1 files changed
+37
-8
| Type | ||
|---|---|---|
|
|
src/commands/auth.rs | +37 −8 |
|
||