✨ server: add auth method to sardine - #1176
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughCustomer metadata now records an ChangesAuthentication method attribution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
4a03bcb to
695cbaf
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 695cbaf4c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3f1f4ea30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tags: [{ name: "source", value: options?.source ?? "EXA", type: "string" }], | ||
| tags: [ | ||
| { name: "source", value: options?.source ?? "EXA", type: "string" }, | ||
| { name: "auth_method", value: isAddress(credentialId) ? "siwe" : "webauthn", type: "string" }, |
There was a problem hiding this comment.
Derive the tag from the verified auth method
When a WebAuthn authenticator returns an address-shaped credential ID (for example, 0x followed by 40 hex characters), the ID satisfies both the Base64URL validator and isAddress(). The registration path still verifies it as WebAuthn and supplies options.webauthn, but this ternary reports siwe to Sardine, corrupting the authentication-method signal. Derive the value from the verified request method or the presence of options.webauthn instead of the credential ID's syntax.
Useful? React with 👍 / 👎.
| tags: [{ name: "source", value: options?.source ?? "EXA", type: "string" }], | ||
| tags: [ | ||
| { name: "source", value: options?.source ?? "EXA", type: "string" }, | ||
| { name: "auth_method", value: isAddress(credentialId) ? "siwe" : "webauthn", type: "string" }, |
There was a problem hiding this comment.
Keep the new tag in sorted order
The new tag is appended after source, leaving this project-controlled array unsorted even though the repository requires additions to arrays to be inserted in the middle or in sorted position for diff friendliness. Place auth_method before source here and in the corresponding test expectations so future edits preserve the established ordering convention.
AGENTS.md reference: AGENTS.md:L16-L16
Useful? React with 👍 / 👎.
Summary
siweorwebauthnto Sardine through the existing customer tag shapeRelates to #1173.
Verification
pnpm nx test:ts serverpassedpnpm nx test:eslint serverpassedgit diff --checkpassedSummary by CodeRabbit