Skip to content

Instantly share code, notes, and snippets.

@chris-gong
Created May 17, 2020 16:56
Show Gist options
  • Save chris-gong/f5ad16d8c8cdf4b317f9728a14929a10 to your computer and use it in GitHub Desktop.
Save chris-gong/f5ad16d8c8cdf4b317f9728a14929a10 to your computer and use it in GitHub Desktop.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Runtime/Online/HTTP/Public/Http.h"
#include "MainMenuWidget.generated.h"
class UWebBrowser;
/**
*
*/
UCLASS()
class GAMELIFTTUTORIAL_API UMainMenuWidget : public UUserWidget
{
GENERATED_BODY()
public:
UMainMenuWidget(const FObjectInitializer& ObjectInitializer);
protected:
virtual void NativeConstruct() override;
private:
FHttpModule* HttpModule;
UPROPERTY()
FString LoginUrl;
UPROPERTY()
FString ApiUrl;
UPROPERTY()
FString CallbackUrl;
UPROPERTY()
UWebBrowser* WebBrowser;
UFUNCTION()
void HandleLoginUrlChange();
void OnExchangeCodeForTokensResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment