Repository navigation
feat(oauth): emit login metering events for OAuth server token exchanges - #2749
Merged
Merged
Conversation
fadymak
approved these changes
Aug 26, 2026
fadymak
reviewed
Aug 26, 2026
fadymak
reviewed
Aug 26, 2026
fadymak
approved these changes
Aug 26, 2026
Co-authored-by: fadymak <[email protected]>
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>
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 (analytics/observability only, no behavior change)
What is the current behavior?
OAuth 2.1 authorization server logins aren't represented in standard
Loginmetering events:login_method: tokenevent, with no attribution to the OAuth server or client.This makes it impossible to answer "what share of logins flow through the OAuth server?"
What is the new behavior?
handleAuthorizationCodeGrantnow records aoauth_server_authorization_codelogin event (withclient_id) once the exchange has fully succeeded.RefreshTokenGrantnow additionally records anoauth_server_token_refreshlogin event (withclient_id) for OAuth server sessions, alongside the existing (unchanged) generictokenevent.metering.LoginDatagained aClientIDfield, surfaced asclient_idin the emitted log fields.Resolves AUTH-1539