mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 11:24:57 -05:00
The One Tap client forwarded a caller-supplied nonce to Google, but the callback never passed it to verifyGoogleIdToken, so the nonce claim was never checked and a captured ID token could be replayed until it expired. Add POST /one-tap/nonce, which stores a random single-use nonce in the verification table. The client now fetches it before initializing Google and sends it back with the ID token. The callback consumes the nonce before verification, passes it to verifyGoogleIdToken, and rejects a token that carries a nonce claim when none is presented. Closes #10926