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

# Using custom authentication in PnP Unreal Engine SDK

Custom authentication is a way to authenticate users with your custom authentication service. For example, while authenticating with Google, you can use your own Google Client ID to authenticate users directly.

This feature, with MFA turned off, can make Embedded Wallets invisible to the end user.

note

This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **Growth Plan**. You can use this feature in Web3Auth Sapphire Devnet network for free.

## Getting an Auth Connection ID[​](#getting-an-auth-connection-id "Direct link to Getting an Auth Connection ID")

prerequisite

To enable this, you need to [create a connection](/embedded-wallets/dashboard/authentication/) from the **Authentication** tab of your project from the [Embedded Wallets developer dashboard](https://developer.metamask.io) with your desired configuration.

To configure a connection, you need to provide the particular details of the connection into our Embedded Wallets dashboard. This enables us to map a `authConnectionId with your connection details. This `authConnectionId helps us to identify the connection details while initializing the SDK. You can configure multiple connections for the same project, and you can also update the connection details anytime.

tip

Learn more about the [auth provider setup](/embedded-wallets/authentication/) and the different configurations available for each connection.

## Configuration[​](#configuration "Direct link to Configuration")

warning

**"Auth Connection"** is called **"Verifier"** in the Android SDK. It is the older terminology which we will be updating in the upcoming releases.

Consequentially, you will see the terms **"Verifier ID"** and **"Aggregate Verifier"** used in the codebase and documentation referring to **"Auth Connection ID"** and **"Grouped Auth Connection"** respectively.

To use custom authentication (using supported Social providers or Login providers like Auth0, AWS Cognito, Firebase, or your own custom JWT login), you can add the configuration using `loginConfig` parameter during the initialization.

The `loginConfig` field is a key value map. The key should be one of the `Web3AuthProvider` in its string form, and the value should be a `LoginConfigItem` struct instance.

## Arguments[​](#arguments "Direct link to Arguments")

### `LoginConfigItem`[​](#loginconfigitem "Direct link to loginconfigitem")

- Table
- Interface

| Parameter              | Description                                                                                                                                                                                                                                                                                                                  |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| verifier               | The name of the verifier that you have registered on the Embedded Wallets dashboard. It's a mandatory field, and accepts FString as a value.                                                                                                                                                                                 |
| typeOfLogin            | Type of login of this verifier, this value will affect the login flow that is adapted. For example, if you choose google, a Google sign-in flow will be used. If you choose jwt, you should be providing your own JWT token, no sign-in flow will be presented. It's a mandatory field, and accepts FTypeOfLogin as a value. |
| clientId               | Client ID provided by your login provider used for custom verifier. for example, Google's Client ID or Web3Auth's client ID if using JWT as TypeOfLogin. It's a mandatory field, and accepts FString as a value.                                                                                                             |
| name?                  | Display name for the verifier. If null, the default name is used. It accepts FString as a value.                                                                                                                                                                                                                             |
| description?           | Description for the button. If provided, it renders as a full length button. else, icon button. It accepts FString as a value.                                                                                                                                                                                               |
| verifierSubIdentifier? | The field in JWT token which maps to verifier ID. Please make sure you selected correct JWT verifier ID in the developer dashboard. It accepts FString as a value.                                                                                                                                                           |
| logoHover?             | Logo to be shown on mouse hover. It accepts FString as a value.                                                                                                                                                                                                                                                              |
| logoLight?             | Light logo for dark background. It accepts FString as a value.                                                                                                                                                                                                                                                               |
| logoDark?              | Dark logo for light background. It accepts FString as a value.                                                                                                                                                                                                                                                               |
| mainOption?            | Show login button on the main list. Boolean value; default is false.                                                                                                                                                                                                                                                         |
| showOnModal?           | Whether to show the login button on modal or not. Default value is true.                                                                                                                                                                                                                                                     |
| showOnDesktop?         | Whether to show the login button on desktop. Default value is true.                                                                                                                                                                                                                                                          |
| showOnMobile?          | Whether to show the login button on mobile. Default value is true.                                                                                                                                                                                                                                                           |

```
USTRUCT(BlueprintType)
struct FLoginConfigItem
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString verifier;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString typeOfLogin;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString name;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString description;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString clientId;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString verifierSubIdentifier;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString logoHover;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString logoLight;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		FString logoDark;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool mainOption;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool showOnModal;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool showOnDesktop;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
		bool showOnMobile;

	FLoginConfigItem() {};

	bool operator== (const FLoginConfigItem& other) {
		return other.clientId == clientId;
	}

};

```

### `TypeOfLogin`[​](#typeoflogin "Direct link to typeoflogin")

```
UENUM(BlueprintType)
enum class FTypeOfLogin : uint8
{
	GOOGLE,
	FACEBOOK,
	REDDIT,
	DISCORD,
	TWITCH,
	APPLE,
	LINE,
	GITHUB,
	KAKAO,
	LINKEDIN,
	TWITTER,
	WEIBO,
	WECHAT,
	EMAIL_PASSWORDLESS,
	EMAIL_PASSWORD,
	JWT
};

```

## Usage[​](#usage "Direct link to Usage")

![Unreal Blueprint Login Options](/img/embedded-wallets/unreal/provider-options.png) 

- Google
- Facebook
- Email Passwordless
- Auth0

![Unreal Blueprint Google Custom Login](/img/embedded-wallets/unreal/google-custom-auth.png)

![Unreal Blueprint Facebook Custom Login](/img/embedded-wallets/unreal/fb-custom-auth.png)

![Unreal Blueprint Email Passwordless Custom Login](/img/embedded-wallets/unreal/email-passwordless.png)

![Unreal Blueprint Auth0 Custom Login](/img/embedded-wallets/unreal/auth0-login-config.png)![Unreal Blueprint Auth0 Extralogin option](/img/embedded-wallets/unreal/extraloginoption-auth0.png)

note

- dapp share is only returned for the custom authentication verifiers.
- 2FA should be enabled for the account using it.  
Use `mfaLevel = MFALevel.MANDATORY` in the `LoginParams` during login. See **[MFA](/embedded-wallets/sdk/unreal/advanced/mfa/)** for more details.
