How to configure OnlineSubsystem LoginFlow

I created the OnDisplayLoginWidget like Josh’s example:

void AMyPlayerController::OnDisplayLoginWidget(const TSharedRef& DisplayWidget)

ILoginFlowManager::FOnDisplayPopup::CreateUObject(this, &AMyPlayerController::OnDisplayLoginWidget)

That code will try to create a new ILoginFlowManager::FOnDisplayPopup delegate, and assign it to the AMyPlayerController::ONDisplayLoginWidget, for the instance this.

The problem here is that the signature is wrong so it can’t. This is wrong in the sample code provided as well.

If you take a look, ILoginFLowManager::FOnDisplayPopup is declared as following:

DECLARE_DELEGATE_RetVal_OneParam(FOnPopupDismissed, FOnDisplayPopup, const TSharedRef& /*LoginWidget*/);

So, it needs to return an ILoginFlowManager::FOnPopupdDismissed and takes in a const TSharedRef& as an argument.

If you actually take a look at the error you received, it calls this out:

Error (active) E0304 no instance of overloaded function “TBaseDelegate ::CreateUObject [with WrappedRetValType=ILoginFlowManager::FOnPopupDismissed, ParamTypes= &>]” matches the argument list Comp f:\Unreal Projects\Comp\Source\Comp\MyPlayerController.cpp 77

Notice, it provides you with the correct signature

TBaseDelegate ::CreateUObject [with WrappedRetValType=ILoginFlowManager::FOnPopupDismissed, ParamTypes= &>]"

Then calls out where you were trying to improperly create it:

f:\Unreal Projects\Comp\Source\Comp\MyPlayerController.cpp 77

Again, I wouldn’t take the sample code above as anything but pseudo code. You’ll need to take a look at these errors and the actual implementations of things to come up with actual usable code.

Thanks,
Jon N.

Thanks again Jon. I really appreciate your time, and the detailed breakdown.

I corrected one typo, (for anyone following along) here:

ILoginFlowManager::FOnPopupdDismissed 

should be

ILoginFlowManager::FOnPopupDismissed 

And with that, it’s compiling.

It’s still not doing anything (to be expected). Where should I go to get help with the next part(s)? “create a login flow UI which contains the slate widget or native host widget blueprint implementable”

Should we do that here? Take it to a new thread?

Since we’re gotten past configuration and compilation, that maybe better off in another thread.

However, that’s probably something that’s more game specific and something you may need to work out more on your own.

Here are some docs to get you started writing slate, however.

Ok, I started a new thread for the UI, HERE

that’s probably something that’s more
game specific

How is a Facebook login game specific?

Granted, there could be some game-specific polish for the UI, but the basic login process will be the same for all games using facebook login, because it is defined in the Facebook OSS.

Thanks again.

Sorry, what I meant was that the UI specifically would be Game Specific.

Yes, the high level login logic for Facebook / Google would be somewhat the same, but the actual implementation of the UI will be up to you (how it looks, anything else it does, etc.)

Thanks,
Jon N.

Thanks Jon.

I’m just looking for assistance with the bare minimum to get the Login working. I don’t expect hand holding from you guys to make a gorgeous UI. I just want login to work.

I don’t understand why there is so much resistance here. Is facebook/google OSS no longer supported? Are you trying to discourage people from using it?

Going on a month now with no resolution to this issue. This is a blocker for everyone that is using fb/google on 4.16. /begs please please, can we get some more support on this issue so we can move on?

Any update? This is a blocker for me.

I was out for the last few weeks. I will try to get a rough example up by the end of next week on the other thread.

Would really appreciate resolution on this. TIA!

Giving this a bump as I need this fixed as well. :slight_smile:

Just got this working. Would be happy to help if you still have any issues.

Why did these (simple) engine fixes not get included in the 4.17 release?

https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Plugins/Online/OnlineFramework/OnlineFramework.uplugin

I know this is an old question, but I just started messing with the Google online subsystem and have run into the issue of the widget not displaying anything. I made a widget blueprint with a native widget host, which I then set the content of in the example’s “OnDisplayLoginWidget”, but when I add the widget to the viewport, it doesn’t show anything at all. I gave the native widget host a tooltip just to see if it is there at all and it is (the tooltip appears no matter where my cursor is on the screen), but nothing shows up. Also, the LoginFlow is ticking, but obviously I cannot do anything with it since I see nothing. So, it seems that the login flow starts up, but for whatever reason I cannot get the widget to display properly. Any ideas? Note: I am currently using 4.20.

Take a look at the uetopia source, which has working examples. PRO/MMO