Skip to content

feat(otp): add expires_at column to one_time_tokens table - #2765

Merged
annabkr merged 1 commit into
masterfrom
annabaker/auth-1552-add-expiresat-column-to-the-one_time_tokens-table
Sep 2, 2026
Merged

annabkr merged 1 commit into
masterfrom
annabaker/auth-1552-add-expiresat-column-to-the-one_time_tokens-table

Conversation

@annabkr

@annabkr annabkr commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

It's a schema migration.

What is the current behavior?

There is no expires_at column on the one_time_tokens table.

OTP flows rely on users.*_sent_at timestamps to infer expiration.

What is the new behavior?

There is an expires_at column on the one_time_tokens table.

This will allow us to stop relying on the users table for expiration data.

Additional context

See AUTH-1552 and its project.

Prepares the database for durable OTP challenge expiry, replacing the
current inference from users.*_sent_at (AUTH-1552).
@annabkr annabkr changed the title feat(otp): add expires_at column to one_time_tokens table (not used) feat(otp): add expires_at column to one_time_tokens table Aug 31, 2026
@annabkr
annabkr marked this pull request as ready for review August 31, 2026 18:12
@annabkr
annabkr requested a review from a team as a code owner August 31, 2026 18:12
@annabkr
annabkr requested a review from fadymak September 1, 2026 14:32
@annabkr
annabkr merged commit 05d9aec into master Sep 2, 2026
20 checks passed
@annabkr
annabkr deleted the annabaker/auth-1552-add-expiresat-column-to-the-one_time_tokens-table branch September 2, 2026 13:56
xlgmokha pushed a commit that referenced this pull request Sep 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.197.0](v2.196.0...v2.197.0)
(2026-09-03)


### Features

* fix golangci-lint errors
([#2776](#2776))
([5e372a9](5e372a9))
* **mfa:** add recovery code crypto primitives
([e3ab2df](e3ab2df))
* **mfa:** add recovery code factor model support
([cb30720](cb30720))
* **mfa:** add recovery codes configuration
([507e2ab](507e2ab))
* **mfa:** add recovery codes delete endpoint
([0907af9](0907af9))
* **mfa:** add recovery codes regenerate endpoint
([4c82af9](4c82af9))
* **mfa:** add recovery codes status and generate endpoints
([6607756](6607756))
* **mfa:** add recovery codes verify endpoint
([92a1569](92a1569))
* **mfa:** add schema for recovery codes factor
([#2725](#2725))
([5e4bec6](5e4bec6))
* **mfa:** recovery code storage model
([270d02f](270d02f))
* **mfa:** recovery codes API errors
([41f0498](41f0498))
* **mfa:** recovery codes audit log events
([20b4c05](20b4c05))
* **mfa:** recovery codes metering
([63d8d83](63d8d83))
* **oauth:** emit login metering events for OAuth server token exchanges
([#2749](#2749))
([719db0b](719db0b))
* **otp:** add expires_at column to one_time_tokens table
([#2765](#2765))
([05d9aec](05d9aec))
* **scim:** add scim_users, scim_tokens tables
([#2745](#2745))
([9c8b7ee](9c8b7ee))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
annabkr added a commit that referenced this pull request Sep 18, 2026
## What kind of change does this PR introduce?
Write to the new `expires_at` column when creating `one_time_tokens`

## What is the current behavior?
The column was added in #2765 , but it is not yet written to.

## What is the new behavior?
We write to `expires_at`, and have tests asserting expected behavior,
but do not yet read from it.

## Additional context
See AUTH-1552.

---------

Co-authored-by: Claude Sonnet 5 <[email protected]>
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.

2 participants