Repository navigation
Log a login link from the development server - #180
2chanhaeng wants to merge 1 commit into
Conversation
mise run dev --login-link=<email> logs, right after the server starts listening, a link that logs in as the account with that email address, so that a seeded account can be used without reading login mail. An empty value, --login-link=, means owner@example.com, since mise task flags cannot take an optional value. The task passes the address to the new hidden --dev-login-link option of drfed-server, together with the origin of the frontend development server through the new hidden --dev-login-origin option, which must be one of the login origins. When the server serves the frontend, the origin defaults to the public web origin; otherwise it is required. The server stores a login challenge for the account and logs the frontend's confirmation link. An address no account has is only warned about. The challenge is the one loginByEmail stores, so it is single-use and expires after 15 minutes; the challenge code generator moves to @drfed/models/login as generateLoginChallengeCode() so that both share it. AI assistance: the maintainer asked Claude Code for a dev task option that logs a login link after startup. Claude Code designed the hidden server options, wrote the code, and moved the code generator. The maintainer found that the first design, which took the first login origin, pointed to the GraphQL server. The build, checks, and affected tests were run, and the logged link was completed through completeLoginChallenge against a PGlite server. Assisted-by: Claude Code:claude-opus-5-5
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
The documentation preview for a33a15a is ready.
|
Closes #179.
mise run dev --login-link=<email>logs a login link for the account once the server listens.--login-link=meansowner@example.com, since mise task flags cannot take an optional value. The task passes the address to a new hidden--dev-login-linkoption ofdrfed-server, which stores a challenge asloginByEmaildoes.AI disclosure: written with Claude Code (claude-opus-5-5), verified against a PGlite server. The user tested themselves and verified.