# Working with existing auth

OhAuthCat supplies an enterprise identity through its SSO profile. Your existing authentication system remains responsible for local users, authorization, application sessions and account recovery. Adding SSO does not require replacing that system.

The Node, Python and Go SDKs include a helper per provider. After your callback has the verified profile, the helper finds or creates the linked user in your existing system and starts a session there.

| Existing system | Guide                                     | Session started by                          | Revocation on `dsync.user.deleted`       |
| --------------- | ----------------------------------------- | ------------------------------------------- | ---------------------------------------- |
| Auth0           | [Auth0](/sso/existing-auth/auth0/)        | Your application session for the Auth0 user | Block the user and delete Auth0 sessions |
| Amazon Cognito  | [Cognito](/sso/existing-auth/cognito/)    | Admin-initiated custom authentication       | Global sign-out and disable              |
| Firebase        | [Firebase](/sso/existing-auth/firebase/)  | A custom token for `signInWithCustomToken`  | Revoke refresh tokens and disable        |
| Supabase        | [Supabase](/sso/existing-auth/supabase/)  | A magic link verified on the server         | Ban the user                             |
| Clerk           | [Clerk](/sso/existing-auth/clerk/)        | A sign-in token (ticket strategy)           | Ban the user                             |
| Your own store  | [Custom auth](/sso/existing-auth/custom/) | Your session system                         | Delete the user's sessions               |

An OhAuthCat token is never treated as a token of another provider; each helper uses that provider's own server API.

## Link identities before creating sessions

At the callback, validate state and PKCE, check the expected organization, then look up a tenant-scoped link from the profile's `connection_id` and `idp_id` to a local user. The SDK helpers derive one link key from that pair. Create a new identity only if your application's provisioning policy permits it. Link an existing account through an authenticated, explicit linking process; an equal email address alone is insufficient proof.

Keep personal sign-in and account recovery where your application already supports them. Decide which enterprise tenants require SSO rather than allowing a password route to bypass an organization's policy.

## Revoke access where sessions live

On directory deprovisioning, disable the linked local identity and revoke its application/provider sessions using your supported session system. OhAuthCat does not close those sessions for you. Track directory user links separately from SSO profile links and reconcile them through trusted organization-scoped mapping.

See [profiles](/sso/profiles/), [directory sync](/directory-sync/) and [verified webhooks](/events/webhook-verification/).
