-
Notifications
You must be signed in to change notification settings - Fork 622
Fix missing refresh_token_hmac_key in models.Session 🐛 Issue Reference#2276
Open
Adityakk9031 wants to merge 1 commit intosupabase:master from
Open
Fix missing refresh_token_hmac_key in models.Session 🐛 Issue Reference #2276Adityakk9031 wants to merge 1 commit intosupabase:master from
Adityakk9031 wants to merge 1 commit intosupabase:master from
Conversation
Contributor
hf
commented
Dec 1, 2025
Hmm this shouldn't be happening... do you mind sending a support ticket to view your project more closely?
Author
Adityakk9031
commented
Dec 13, 2025
ok
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐛 Issue Reference
Fixes supabase/auth issue #2270 — *"missing destination name refresh_token_hmac_key in models.Session" during session refresh on iOS (Swift SDK).
📘 Summary
This PR adds the missing
refresh_token_hmac_keyfield to themodels.Sessionstruct with the correctdb:"refresh_token_hmac_key"tag. The Supabase Auth server returns this column in queries, but the Go model previously lacked the corresponding destination field, causing scan errors:Adding this field ensures the database scanner can correctly bind the column, resolving refresh session failures in Swift and other clients.
✅ Changes Included
RefreshTokenHmacKey *string \db:"refresh_token_hmac_key"``tomodels.Session.auth.sessionstable.🔍 Root Cause
The
auth.sessionstable includes a column namedrefresh_token_hmac_key.However,
models.Sessiondid not include the corresponding field, resulting in a mismatched struct during DB row scan and triggering the scanning error.🧪 Testing
Sessionstructs exist usinggit grep.auth.sessionsinto the updated struct completes without errors.📦 Deployment Notes
📄 Checklist
models.Sessionwith correct database tag.