Repository navigation
feat(auth): rename one of the signed-in user's passkeys - #645
Merged
Merged
Conversation
Tr00d
marked this pull request as ready for review
November 3, 2026 07:24
This was referenced Nov 10, 2026
6 tasks
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.
Summary
A signed-in user can rename one of their own passkeys, so they can tell their passkeys apart.
Capability:
auth.passkey.update_passkey, Update Passkey. No capability spec exists.Public API
Passkeymoves fromSupabase.Gotrue.ListPasskeystoSupabase.Gotrue.Common, because listing and renaming both return it.CreatedAtandLastUsedAtbecomeDateTimeOffset/DateTimeOffset?. Both changes affect unshipped surface only: the type was added in #634 after 8.8.0, and 8.9.0 is held.Behavior
PATCH /passkeys/{passkey_id}with the session's access token, body{"friendly_name":"<name>"}.friendlyNamethrowsArgumentExceptionbefore any request. Whitespace and the 120-character limit are left to the server, which counts runes.PasskeyListItem, mapped toPasskey. A success without a body throwsGotrueException("The auth server returned no passkey.").GotrueException.Reason = Offlinewhen the client is offline. No request is sent.Reason = NoSessionFoundwhen no session or access token is held. No request is sent.validation_failedfor a name longer than 120 characters.validation_failedwhen the user has no passkey with that id.passkey_disabledwhen passkeys are off.FailureHint.Reason.PasskeyUpdatedoes not callrequirePasskeyManagementAAL).gotrue.rename_passkeyspan parents the HTTP span.Contract source: supabase/auth
internal/api/passkey_manage.go(PasskeyUpdate,PasskeyUpdateParams,toPasskeyListItem). The authopenapi.yamldoes not describe/passkeys.Deviations from supabase-js
RenamePasskeyAsync, the operation's intent (supabase-swiftrenamePasskey), rather thanpasskey.update. The endpoint changes only the name.GotrueExceptioninstead of{ data, error }.Tests
RenamePasskeyTestsvalidation_failed. An aal1 MFA user can rename.RenamePasskeyContractTestsRenamePasskeyApprovalTests{"friendly_name":"Work laptop"}.OfflineClientContractTests,ObservabilityContractTestsgotrue.rename_passkeyparentsPATCH /passkeys/{id}.Changed-line coverage: 100% (21 lines). Mutation: 10/10 tested mutants on changed lines killed, 0 survivors (2 block-removal mutants on async bodies are ignored by Stryker).
Notes
ListPasskeys/no longer holds types. Its tests stay inGotrue.Tests/ListPasskeys/.[auth.passkey],[auth.webauthn]from feat(auth): list the signed-in user's passkeys #634). Noconfig.tomlchange.