Skip to content

fix: update identity last sign-in time on OAuth sign-ins#2566

Open
pjpjq wants to merge 1 commit into
supabase:masterfrom
pjpjq:codex/fix-identity-last-sign-in
Open

fix: update identity last sign-in time on OAuth sign-ins#2566
pjpjq wants to merge 1 commit into
supabase:masterfrom
pjpjq:codex/fix-identity-last-sign-in

Conversation

@pjpjq
Copy link
Copy Markdown

@pjpjq pjpjq commented Jun 5, 2026

What changed

  • Refresh the existing OAuth identity's last_sign_in_at timestamp when a known identity signs in again.
  • Add a Google OAuth regression test that verifies auth.identities.last_sign_in_at moves forward on subsequent sign-ins.

Fixes #2563.

Testing

  • go test ./internal/api -run 'TestExternal/TestSignupExternalGoogleUpdatesIdentityLastSignInAt' -count=1
  • go test ./internal/api -run 'TestExternal/TestSignupExternalGoogle(_AuthorizationCode|DisableSignupSuccessWithPrimaryEmail|UpdatesIdentityLastSignInAt)$' -count=1
  • go test ./internal/api -run TestExternal -count=1

@pjpjq pjpjq requested a review from a team as a code owner June 5, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auth.identities.last_sign_in_at not updated after subsequent sign-ins (contradicts docs)

1 participant