> For the complete documentation index, see [llms.txt](/llms.txt).

# Get identity token

Use the `getIdentityToken` method to retrieve the identity token (OIDC ID token) for the user's current auth session. You can send this token to your backend to verify the user. See [ID token](/embedded-wallets/authentication/id-token/) and [server-side verification](/embedded-wallets/features/server-side-verification/).

This method is available from v8.

## Usage

```dart
try {
  final String idToken = await Web3AuthFlutter.getIdentityToken();
} catch (e) {
  // Thrown when no authenticated session is present.
  log(e.toString());
}

```

## Errors

`getIdentityToken` throws when no authenticated session is present.
