# Enable user identity

## Enable user identity

XpansionChain Passport is an <mark style="color:blue;">Open ID</mark> provider and uses the <mark style="color:blue;">Open ID Connect</mark> protocol for authentication and authorization. Third-party applications, such as games or marketplaces, can integrate Passport into their platforms to authenticate their users and access their wallets.

To learn how to create and configure your OAuth client, please refer to the <mark style="color:blue;">Installation guide.</mark>

### How authentication works[​](https://docs.x.immutable.com/docs/x/passport/enable-user-identity#how-authentication-works) <a href="#how-authentication-works" id="how-authentication-works"></a>

When using Passport as an identity provider, the authentication flow begins within your application. If the user already has an account with Passport, they can sign in to their existing account using the same credentials, which can be shared across multiple apps.

For new users, they will need to sign up for a new account and complete the authentication flow to be authenticated in your application.

The high-level steps for the authentication flow are as follows:

1. The user clicks on "Login with Passport" in your application.
2. The user a window pop-up is opened with Passport's secure login page (auth.XpansionChain.com).
3. The user authenticates based on their preferred login method.
4. The user approves the scopes you requested when registering your app's OAuth client (only once).
5. The user is redirected to the callback URL you defined when registering your app's OAuth client.
6. Your application obtains an id\_token and an access\_token.

If you are using the XpansionChain SDK, all these steps are simplified by the `passport.connectIMX()` function. You can find more information here: <mark style="color:blue;">Integrate Login.</mark>
