feat(otp): add link_token_hash column to one_time_tokens table - #2800
Open
annabkr wants to merge 1 commit into
Open
feat(otp): add link_token_hash column to one_time_tokens table#2800annabkr wants to merge 1 commit into
annabkr wants to merge 1 commit into
Conversation
annabkr
marked this pull request as ready for review
September 11, 2026 20:46
annabkr
commented
Sep 11, 2026
| begin | ||
| create index if not exists one_time_tokens_link_token_hash_hash_idx on {{ index .Options "Namespace" }}.one_time_tokens using hash (link_token_hash); | ||
| exception when others then | ||
| -- Fallback to a btree index if hash creation fails |
Contributor
Author
There was a problem hiding this comment.
This is what we do for the token_hash and that choice seemed to be grounded in OrioleDB support.
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.
What kind of change does this PR introduce?
Feature
What is the current behavior?
Token hashes are stored in the
token_hashcolumn and tightly coupled to the low-entropy OTP code.What is the new behavior?
There is a new column
link_token_hashwhich will be used to store a high-entropy token hash for user flows that don't require typing in a code.Additional context
Closes AUTH-1556.