Hello, in this series, I’ll show you how to set up a login system using Amazon Cognito, Amazon Lambda Functions, Amazon API Gateway and a plugin called HTTP Requests for Blueprints.
Hello, in this series, I’ll show you how to set up a login system using Amazon Cognito, Amazon Lambda Functions, Amazon API Gateway and a plugin called HTTP Requests for Blueprints.
The goal is to show you how to create a simple login UI with some AWS services for a login system then you should be able to figure out on your own to add the Reset and Forgot password features.
Installing the HTTP Request for Blueprints Plugin
To begin, go to the Unreal Engine Marketplace. Search for HTTP Requests for Blueprints and install it.
If you used the Unreal Engine source code from Github to create your project, a link is posted in the video description on how to install this plugin for your project.
Creating the Login UI
Once you installed the plugin, we’ll need a UI that can allow people to create an account and sign in with it.
Locate the downloaded files and unzip the folder. Bring all the assets into the project.
For the Sign In screen, search for “Canvas” in the palette and place it inside the switcher. Call it SignInWidget.
Now change the Anchor again to the one in the center.
Now set the image to SignInTemplate.
For the Sign Up widget, we’ll do the same by adding another canvas to the Widget Switcher and naming it SignUpWidget.
Then repeat the steps from earlier to add the components.
Once all the components are added, call the input in the top, SignUpEmail and the one at the bottom SignUpPassword.
For the button on the top, call it SignUpButton and the bottom button “SwitchToSignInWidgetButton.”
Adding logic to toggle between widgets
Now switch to the Graph mode and grab a reference to the SwitchToSignUpWidgetButton and the SwitchToSignInWidgetButton.
If you do not see them on the left, make sure all buttons and input fields have the Is Variable field checked.
Attach a click event to both.
When we click on the SwitchToSignUpWidgetButton, we want to switch to the SignUp widget. To do that, first get the reference to the MenuSwitcher.
If we take a look at the MenuSwitcher, the SignInWidget is index 0 and the SignUpWidget is index 1
Now for the SwitchToSignInWidgetButton, call Set Active Widget Index and set the index to 0.
Testing to UI
To test this, compile and save the progress.
If we run the app, we should see the menu. When we click on the Sign Up button, it should switch to the Sign Up page. And if we click on the Sign In button, it’ll go back to the Sign In page.
Adding the Confirmation Widget
If you got this far, you are almost done.