fix(auth): validate token issuer, drop 2FA email gate, unify email-change SQL #129

Merged
David merged 1 commit from fix/bunyip-75-token-issuer into main 2026-06-12 11:45:23 +02:00
Owner

verify_refresh_token and verify_2fa_challenge_token now call set_issuer so cross-deploy tokens fail closed, matching the access-token path; iss is added to RefreshTokenClaims and TwoFactorChallengeClaims and stamped at creation. Remove the unused decode_without_validation footgun (zero callers) that disabled expiry and signature checks. request_email_verification no longer requires 2FA to be enabled, since the verification token itself proves ownership. The email-change immediate and confirm paths now run through executor-generic repository methods (lock_for_update, find_by_id_for_update, email_exists, update_email, revoke_all_user_refresh_tokens, confirm_email_change_request) instead of raw inline SQL, keeping query ownership in the repositories.

Branch-backed replacement for #125 (that PR was AGit-only and had no merge button after falling behind main). Rebased clean onto current main.

#BUNYIP-75

verify_refresh_token and verify_2fa_challenge_token now call set_issuer so cross-deploy tokens fail closed, matching the access-token path; iss is added to RefreshTokenClaims and TwoFactorChallengeClaims and stamped at creation. Remove the unused decode_without_validation footgun (zero callers) that disabled expiry and signature checks. request_email_verification no longer requires 2FA to be enabled, since the verification token itself proves ownership. The email-change immediate and confirm paths now run through executor-generic repository methods (lock_for_update, find_by_id_for_update, email_exists, update_email, revoke_all_user_refresh_tokens, confirm_email_change_request) instead of raw inline SQL, keeping query ownership in the repositories. Branch-backed replacement for #125 (that PR was AGit-only and had no merge button after falling behind main). Rebased clean onto current main. #BUNYIP-75
fix(auth): validate token issuer, drop 2FA email gate, unify email-change SQL
All checks were successful
Check / fmt / clippy / build / test (pull_request) Successful in 1m0s
Create release / Create release from merged PR (pull_request) Has been skipped
da8552cdcd
verify_refresh_token and verify_2fa_challenge_token now call set_issuer so cross-deploy tokens fail closed, matching the access-token path; iss is added to RefreshTokenClaims and TwoFactorChallengeClaims and stamped at creation. Remove the unused decode_without_validation footgun (zero callers) that disabled expiry and signature checks. request_email_verification no longer requires 2FA to be enabled, since the verification token itself proves ownership. The email-change immediate and confirm paths now run through executor-generic repository methods (lock_for_update, find_by_id_for_update, email_exists, update_email, revoke_all_user_refresh_tokens, confirm_email_change_request) instead of raw inline SQL, keeping query ownership in the repositories.

#BUNYIP-75
David merged commit 7dd2151692 into main 2026-06-12 11:45:23 +02:00
David deleted branch fix/bunyip-75-token-issuer 2026-06-12 11:45:23 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/bunyip!129
No description provided.