> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate with an External JWT

> Sign users into Dynamic with a JWT issued by your own authentication provider (Bring Your Own Auth).

<Note>
  Bring Your Own Auth is an enterprise feature. Contact us [in Slack](https://dynamic.xyz/slack) or at [dynamic@fireblocks.com](mailto:dynamic@fireblocks.com) to enable it.
</Note>

If your app already has an authentication system or uses a provider like Auth0, Firebase Auth, or Supabase, you can exchange the JWT that system issues for a Dynamic session. Dynamic verifies the token, creates or matches a user record, and returns its standard session. For concepts, JWT requirements, and console configuration, see [Bring Your Own Auth](/docs/auth/bring-your-own-auth).

## Prerequisites

* Dynamic Unity SDK installed and configured (see the [Installation Guide](/docs/unity/installation-guide))
* Bring Your Own Auth enabled and configured in the [Dynamic developer console](https://console.dynamic.xyz) (issuer, JWKS URL, and optionally audience and cookie name)
* Your backend issues a JWT with at least `iss`, `sub`, and `exp` claims

## Sign in

Call `SignInWithExternalJwt` on `Auth.ExternalAuth` with the JWT issued by your auth provider and the user's ID in your system, which corresponds to the JWT's `sub` claim.

```csharp theme={"system"}
await DynamicSDK.Instance.Auth.ExternalAuth.SignInWithExternalJwt(
    new SignInWithExternalJwtParams
    {
        ExternalJwt = jwtToken,
        ExternalUserId = userId,
    });
```

## Related

* [Bring Your Own Auth](/docs/auth/bring-your-own-auth): concepts, configuration, and JWT requirements.
* [Session Management](/docs/unity/session-management): manage the session after sign-in.
