> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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.

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](https://docs.dynamic.xyz/docs/auth/bring-your-own-auth.md).

## Prerequisites

* Dynamic Unity SDK installed and configured (see the [Installation Guide](https://docs.dynamic.xyz/docs/unity/installation-guide.md))
* Bring Your Own Auth enabled and configured in the [Dynamic 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](https://docs.dynamic.xyz/docs/auth/bring-your-own-auth.md): concepts, configuration, and JWT requirements.
* [Session Management](https://docs.dynamic.xyz/docs/unity/session-management.md): manage the session after sign-in.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.