Skip to content

feature: auth agent references#36

Merged
Rodriguespn merged 12 commits intofeature/supabase-skillfrom
feature/auth-agent-references
Feb 13, 2026
Merged

feature: auth agent references#36
Rodriguespn merged 12 commits intofeature/supabase-skillfrom
feature/auth-agent-references

Conversation

@Rodriguespn
Copy link
Collaborator

@Rodriguespn Rodriguespn commented Feb 9, 2026

Summary

Adds 15 authentication reference files covering the complete auth lifecycle:

  • Core (auth-core-*): Sign-up, sign-in, and session management with onAuthStateChange and token refresh
  • OAuth (auth-oauth-*): Provider setup (Google, GitHub, Apple, Azure) and PKCE flow for SPAs/SSR
  • MFA (auth-mfa-*): TOTP authenticator apps with AAL1/AAL2 and phone verification via Twilio/MessageBird
  • Passwordless (auth-passwordless-*): Magic links and email/phone OTP
  • Hooks (auth-hooks-*): Custom JWT claims for RBAC/multi-tenancy and custom email/SMS hooks
  • Server-side (auth-server-*): SSR patterns for Next.js, SvelteKit, Nuxt and admin API with service role
  • SSO (auth-sso-*): SAML 2.0 setup and attribute mapping

Each reference includes quick-start examples, incorrect/correct patterns, and security best practices. Also updates SKILL.md, AGENTS.md, and _sections.md with the new Authentication section.

@Rodriguespn Rodriguespn self-assigned this Feb 9, 2026
@Rodriguespn Rodriguespn added the new-rule Adding a new rule(s) to a skill label Feb 9, 2026
@Rodriguespn Rodriguespn changed the title Feature/auth agent references feature: auth agent references Feb 9, 2026
@Rodriguespn Rodriguespn force-pushed the feature/supabase-skill branch from 397502e to d097278 Compare February 10, 2026 19:00
@Rodriguespn Rodriguespn force-pushed the feature/auth-agent-references branch 2 times, most recently from e43f621 to 6417961 Compare February 12, 2026 12:07
@Rodriguespn
Copy link
Collaborator Author

Hey Auth team, I've gave this another look by comparing the information from the reference files and our documentation. Below is the changelog report with the changes for each file and the sources I used for each one


auth-hooks-send-email.md — Corrected magic_link to magiclink (no underscore), switched to npm:resend instead of Resend API directly, and split into two separate files for SQL and HTTP hook setup.

auth-server-ssr.md — Replaced getUser() with getClaims() in middleware (docs now require it) and renamed middleware pattern from middleware.ts to proxy.ts.

auth-core-sessions.md — Fixed misleading INITIAL_SESSION event description, added getClaims() as preferred validation method, removed unverifiable deprecation claim about symmetric JWTs, removed incorrect Dashboard paths.

auth-core-signin.md — Documented that email change double confirmation depends on "Secure Email Change" setting.

auth-core-signup.md — Fixed "fail silently" → redirects to Site URL, added warning that trigger failures block sign-ups.

auth-hooks-custom-claims.md — Added supabase_auth_admin table permissions for user_roles, documented authentication_method input field with all valid values.

auth-mfa-phone.md — Fixed "SMS sent automatically" → challenge() is required, replaced hardcoded pricing with docs link, noted MFA phone config is shared with phone login.

auth-mfa-totp.md — RLS policy now uses (select auth.uid()) for performance.

auth-oauth-pkce.md — Awaited cookies() for Next.js 15+, renamed ANON_KEYPUBLISHABLE_KEY, rewrote Common Mistake #1, fixed broken docs URL.

auth-oauth-providers.md — Azure scopes corrected to just email, provider tokens via onAuthStateChange instead of getSession(), expanded Apple setup with 6-month key rotation warning, noted linkIdentity() is beta.

auth-passwordless-magic-links.md — Template uses {{ .RedirectTo }} instead of {{ .SiteURL }}, added complete template variables list.

auth-passwordless-otp.md — Removed hardcoded "expires in 1 hour", added WhatsApp channel option, added 60-second verification window note.

auth-server-admin-api.md — Added note about key model transition (anon/service_rolesb_publishable/sb_secret).

auth-server-ssr.md — Updated ANON_KEYPUBLISHABLE_KEY across all examples, SvelteKit switched to import.meta.env, added getClaims() mention in Server Component.

auth-sso-saml.md — Added SAML 2.0 enable prerequisite, updated pricing to note 50 included MAUs, added MFA amr array caveat.

Rodriguespn and others added 12 commits February 13, 2026 15:30
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
signOut() defaults to scope: 'global' (all sessions on all devices),
not current session only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace redundant explicit 'global' example with 'local' scope,
making all three options (global, local, others) visible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Rodriguespn Rodriguespn force-pushed the feature/auth-agent-references branch from 6417961 to 9183adc Compare February 13, 2026 15:41
@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • !master
  • !main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/auth-agent-references

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

@Rodriguespn Rodriguespn merged commit 5bf5ee3 into feature/supabase-skill Feb 13, 2026
4 checks passed
@Rodriguespn Rodriguespn deleted the feature/auth-agent-references branch February 13, 2026 15:42
Rodriguespn added a commit that referenced this pull request Feb 13, 2026
* feat: auth agent references

* Update skills/supabase/references/auth-core-sessions.md

Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>

* refactor: improve auth state management and update session handling examples

* docs: update performance note for asymmetric JWTs

* fix: correct signOut() default scope to 'global'

signOut() defaults to scope: 'global' (all sessions on all devices),
not current session only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: improve signOut() examples to show all three scope options

Replace redundant explicit 'global' example with 'local' scope,
making all three options (global, local, others) visible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: flatten auth references to root references directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* correct auth hooks

* correct auth server ssr

* fix auth reference files

* fix paths inside skill.md

* update agents.md

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-rule Adding a new rule(s) to a skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants