---
title: "Supabase Auth: Identity Linking, Hooks, and HaveIBeenPwned integration"
description: "Supabase Auth adds four features: manual Identity Linking via linkIdentity()/unlinkIdentity() for OAuth identities, session controls (time-boxed sessions, inactivity timeouts, single session per user on Pro and above), leaked password protection using the HaveIBeenPwned Pwned Passwords API with configurable password requirements, and Auth Hooks."
url: "https://swe.quest/articles/supabase-auth-identity-linking-hooks-and-haveibeenpwned-integration-8ed59b21ef27e3e6"
canonical: "https://supabase.com/blog/supabase-auth-identity-linking-hooks"
source: "Supabase"
published: "2023-12-14"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["identity-auth","postgres"]
---

# Supabase Auth: Identity Linking, Hooks, and HaveIBeenPwned integration

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-12-14, 5 min read, Announcement. Original: [https://supabase.com/blog/supabase-auth-identity-linking-hooks](https://supabase.com/blog/supabase-auth-identity-linking-hooks)

## Summary

Supabase Auth adds four features: manual Identity Linking via linkIdentity()/unlinkIdentity() for OAuth identities, session controls (time-boxed sessions, inactivity timeouts, single session per user on Pro and above), leaked password protection using the HaveIBeenPwned Pwned Passwords API with configurable password requirements, and Auth Hooks. Auth Hooks are Postgres functions that run synchronously at points such as access token generation, MFA verification and password verification, so they can add custom JWT claims or enforce custom security rules. Webhook-based hooks via Standard Webhooks are planned for Q1 2024. The GoTrue fork is also being renamed to Auth, with no breaking changes.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- JWT basics
- PL/pgSQL functions

## Keywords

Supabase Auth, HaveIBeenPwned, Auth Hooks, GoTrue, Standard Webhooks, PL/pgSQL

## Related posts

- [Supabase Auth now supports Anonymous Sign-ins](https://swe.quest/articles/supabase-auth-now-supports-anonymous-sign-ins-1d15678eda734aad.md): Supabase · 2024-04-17 · Medium · 4 min read · Identity & auth, PostgreSQL
  Supabase Auth adds anonymous sign-ins, letting apps create temporary users who are treated as \`authenticated\` and persisted in \`auth.users\` with an \`is\_anonymous\` flag exposed as a JWT claim.
- [supabase-js v2](https://swe.quest/articles/supabase-js-v2-f87cba2e3b41f9e9.md): Supabase · 2022-08-16 · Medium · 5 min read · JavaScript, TypeScript, API design, Identity & auth, PostgreSQL
  supabase-js v2 brings incremental quality-of-life changes over v1.
- [Build "Sign in with Your App" using Supabase Auth](https://swe.quest/articles/build-sign-in-with-your-app-using-supabase-auth-a42222eedce43362.md): Supabase · 2025-12-04 · Medium · 6 min read · Identity & auth, AI agents, PostgreSQL
  Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with \[Your App\]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO.
- [PostgREST 9](https://swe.quest/articles/postgrest-9-20b92866c21e13eb.md): Supabase · 2021-11-27 · Medium · 2 min read · PostgreSQL, API design
  PostgREST 9 adds inner-join resource embedding via the \`!inner\` keyword, so top-level rows can be filtered by conditions on an embedded table (e.g. messages filtered by users.username).
- [A Simple 3-Step Process to Migrate from Supabase Auth to Neon Auth](https://swe.quest/articles/a-simple-3-step-process-to-migrate-from-supabase-auth-to-neon-auth-4a39ae039de9e6ef.md): Neon · 2025-03-25 · Medium · 5 min read · Identity & auth, PostgreSQL, JavaScript
  Supabase Auth users can be moved to Neon Auth (built on Stack Auth) without forcing password resets by exporting bcrypt hashes in Modular Crypt Format and importing them through the Stack Auth REST API.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
