question

Lukas avatar image
Lukas asked

Unreal Authentication Context

Hey guys,

We Are working on an Unreal Game at the Moment and my Authentication Flow looks like this.

Custom c# launcher logs into Account

->

Launcher Passes entity Token and Session Token to game via command line args when Matched to a Server.

My Problem right now is that i cannot seem to Set These in unreal. So on every call i get an error because the authentication header is empty.

My understanding is that Authentication context gets set when logging in via the Playfab Unreal plugin. When not logging in there, there is the option to use a custom Authentication Context. But nowhere in Documentation i can find an answer to how this needs to formatted.

Any examples on that? Or a workround to somehow set the context?

Greetings

unrealAuthentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Lukas avatar image
Lukas answered

So i have seem to get it working.

I included a new function in PlayfabUtilities and call these with my parsed commandline arguments.

.h
UFUNCTION(BlueprintCallable, Category = "PlayFab | Settings") static void SetSessionTicketandEntityToken(FString Ticket, FString Token); .cpp void UPlayFabUtilities::SetSessionTicketandEntityToken(FString Ticket, FString Token) { IPlayFab* pfSettings = &(IPlayFab::Get()); IPlayFab::Get().setSessionTicket(Ticket); IPlayFab::Get().setEntityToken(Token); }
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Lukas avatar image Lukas commented ·
void UPlayFabUtilities::SetSessionTicketandEntityToken(FString Ticket, FString Token)
{
	IPlayFab::Get().setSessionTicket(Ticket);
	IPlayFab::Get().setEntityToken(Token);
}
0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Lukas commented ·

Thanks for your sharing.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.