# Why can't I login successfully using Online Services 

**URL:** <https://forums.unrealengine.com/t/why-cant-i-login-successfully-using-online-services/2717471>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, epic-online-services, CPP, question\
**Created:** [April 23, 2026, 2:41pm UTC](https://forums.unrealengine.com/t/why-cant-i-login-successfully-using-online-services/2717471 "2026-04-23T14:41:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HappyPantzInc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HappyPantzInc](https://forums.unrealengine.com/u/HappyPantzInc)\
**Post date:** [April 23, 2026, 2:41pm UTC](https://forums.unrealengine.com/t/why-cant-i-login-successfully-using-online-services/2717471/1 "2026-04-23T14:41:37Z")

</div>

I’ve gone and setup login code to work with the Dev Auth Tool. Yes I setup a connection in the tool and as you can see I’ve used the localhost IP and the token name that I setup in the tool as well. Then on the `PlayerController` `BeginPlay` method I call my login method. But no matter what I get the login failure message with the message _invalid parameters._ The Dev Auth Tool is running when I run my game.

Here’s the Login method found in a `GameInstanceSubsystem:`

```cpp
void UMySubsystem::Login()
{
	using namespace UE::Online;

    UE::Online::IOnlineServicesPtr OnlineServices = UE::Online::GetServices();
    UE::Online::IAuthPtr AuthInterface = OnlineServices->GetAuthInterface();

	FAuthLogin::Params LoginParams;

	LoginParams.CredentialsType = LoginCredentialsType::Developer;
	LoginParams.CredentialsId = TEXT("127.0.0.1:8080");
	LoginParams.CredentialsToken.Emplace<FString>("MyTokenName");
   
    AuthInterface->Login(MoveTemp(LoginParams)).OnComplete([](const TOnlineResult<FAuthLogin>& Result)
		{
			if (Result.IsOk())
			{
				UE_LOG(LogOnlineSubsystem, Log, TEXT("Login Successful!"));
			}
			else
			{
				UE_LOG(LogOnlineSubsystem, Error, TEXT("Login Failed: %s"), *Result.GetErrorValue().GetLogString());
			}
		});
}

```

And then here’s the code in the PlayerController:

```cpp
void AMyPlayerController::BeginPlay()
{
	Super::BeginPlay();

	UMyGameInstance* GameInstance = Cast<UEOSBlueprintGameInstance>(GetWorld()->GetGameInstance());
	UMySubsystem* OnlineSubsystem = GameInstance->GetSubsystem<UMySubsystem>();
	ULocalPlayer* LocalPlayer = Super::GetLocalPlayer();

	if (LocalPlayer)
	{
		FPlatformUserId LocalPlayerPlatformUserId = LocalPlayer->GetPlatformUserId();
		if (OnlineSubsystem) // null-check subsystem before access
		{
			UE_LOG(LogOnlineSubsystem, Log, TEXT("Logging in PlatformUserId: %d"), LocalPlayerPlatformUserId.GetInternalId());
			OnlineSubsystem->Login(LocalPlayerPlatformUserId);
		}
	}
}

```

Any help would be greatly appreciated. I want to get this working so I can continue to implement cross play in my game.

---

<div class="post-metadata">

**Author:** ![HappyPantzInc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HappyPantzInc](https://forums.unrealengine.com/u/HappyPantzInc)\
**Post date:** [April 24, 2026, 9:13pm UTC](https://forums.unrealengine.com/t/why-cant-i-login-successfully-using-online-services/2717471/2 "2026-04-24T21:13:10Z")

</div>

Just a note, I am following a mixture of examples from the internet, but I did have to make one change to the `CredentialsToken` because all the examples given, including [THIS ONE](https://dev.epicgames.com/documentation/unreal-engine/auth-interface-in-unreal-engine#example) from Unreal Engine itself, cause a build error due to a type mismatch.

```cpp
Params.CredentialsToken = TEXT("1234567890");

```

The best I could find was to change this out with `.Emplace` but I don’t think this is working as expected and I suspect this is where my issues lie.

---

<div class="post-metadata">

**Author:** ![HappyPantzInc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HappyPantzInc](https://forums.unrealengine.com/u/HappyPantzInc)\
**Post date:** [April 24, 2026, 10:57pm UTC](https://forums.unrealengine.com/t/why-cant-i-login-successfully-using-online-services/2717471/3 "2026-04-24T22:57:32Z")

</div>

Ok I think I found a solution. I don’t know why there doesn’t seem to be any documentation when setting up the Dev Auth Tool for this, but I added

```auto
[EpicOnlineServices]
DevAuthToolAddress=127.0.0.1:8080

```

to my `DefaultEngine.ini`file and now the login works!
