Skip to content

docs(auth): clarify updateUserById does not trigger client listeners#2114

Merged
mandarini merged 1 commit intomasterfrom
docs/update-user-id-auth
Feb 12, 2026
Merged

docs(auth): clarify updateUserById does not trigger client listeners#2114
mandarini merged 1 commit intomasterfrom
docs/update-user-id-auth

Conversation

@mandarini
Copy link
Contributor

@mandarini mandarini commented Feb 12, 2026

Improves jsdoc for admin.updateUserById() to clarify that it doesn't trigger client-side onAuthStateChange listeners, and documents the recommended refreshSession() pattern for syncing server-side admin changes to clients.

Closes #2103

Summary by CodeRabbit

  • Documentation
    • Updated internal developer documentation with server-side usage guidelines and examples.

Note: No user-facing changes in this release.

@mandarini mandarini requested review from a team as code owners February 12, 2026 08:47
@mandarini mandarini self-assigned this Feb 12, 2026
@github-actions github-actions bot added the auth-js Related to the auth-js library. label Feb 12, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

This pull request adds comprehensive JSDoc documentation to the updateUserById method in the GoTrueAdminApi, clarifying that the method is server-only and explaining how clients should synchronize state using refreshSession after server-side updates.

Changes

Cohort / File(s) Summary
Documentation Updates
packages/core/auth-js/src/GoTrueAdminApi.ts
Added JSDoc clarifications to updateUserById explaining server-only usage, client synchronization via refreshSession, server-client workflow examples, and references to related methods.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: documentation clarifying that updateUserById does not trigger client listeners, matching the PR's objective of improving JSDoc clarity on this behavior.
Linked Issues check ✅ Passed The PR adds comprehensive JSDoc documentation to updateUserById clarifying it does not trigger client listeners and documents the refreshSession() pattern for syncing changes, directly addressing issue #2103's objectives.
Out of Scope Changes check ✅ Passed All changes are scoped to improving documentation for the updateUserById method, directly addressing the objectives outlined in the linked issue without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/update-user-id-auth

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 12, 2026

Open in StackBlitz

@supabase/auth-js

npm i https://pkg.pr.new/@supabase/auth-js@2114

@supabase/functions-js

npm i https://pkg.pr.new/@supabase/functions-js@2114

@supabase/postgrest-js

npm i https://pkg.pr.new/@supabase/postgrest-js@2114

@supabase/realtime-js

npm i https://pkg.pr.new/@supabase/realtime-js@2114

@supabase/storage-js

npm i https://pkg.pr.new/@supabase/storage-js@2114

@supabase/supabase-js

npm i https://pkg.pr.new/@supabase/supabase-js@2114

commit: a0c7280

@coveralls
Copy link

Coverage Status

coverage: 82.824%. remained the same
when pulling a0c7280 on docs/update-user-id-auth
into b8c75b0 on master.

@mandarini mandarini merged commit fb88ad4 into master Feb 12, 2026
18 checks passed
@mandarini mandarini deleted the docs/update-user-id-auth branch February 12, 2026 09:48
GuzekAlan added a commit to software-mansion-labs/supabase-js that referenced this pull request Feb 19, 2026
* fix(postgrest): enforce type safety for table and view names in from() method (supabase#2058)

* docs(auth): clarify updateUserById does not trigger client listeners (supabase#2114)

* fix(auth): resolve Firefox content script Promise.then() security errors in locks (supabase#2112)

* build(deps): bump qs from 6.14.1 to 6.14.2 in the npm_and_yarn group across 1 directory (supabase#2118)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(release): version 2.96.0 changelogs (supabase#2121)

Co-authored-by: supabase-releaser[bot] <supabase-releaser[bot]@users.noreply.github.com>

* docs(supabase): document UNUSED_EXTERNAL_IMPORT build warning as false positive (supabase#2122)

* feat(auth): add skipAutoInitialize option to prevent constructor auto-init (supabase#2123)

* chore(release): version 2.97.0 changelogs (supabase#2124)

Co-authored-by: supabase-releaser[bot] <supabase-releaser[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Vaibhav <[email protected]>
Co-authored-by: Katerina Skroumpelou <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
Co-authored-by: supabase-releaser[bot] <supabase-releaser[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth-js Related to the auth-js library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updating user_metadata from GoTrueAdminApi does not trigger the listener onAuthStateChange

3 participants