serverless-auth-msg-board-unity3d-client
Description
Unity 3D example code for connecting to a credentials authenticated AWS Api Gateway endpoint. The example uses Facebook as an AWS Cognito Federated Identity Provider and how to use Signature V4 to sign the request. To demonstrate this an abstract simple message board was implemented (See serverless-auth-msg-board project)
The signature process is based on Examples of Signature Calculations Using C# (AWS Signature Version 4) docs but was changed to fit Unity 3D.
Important Note: Server backend must be set first, please see serverless-auth-msg-board project for more details.
Additional libraries and assets needed:
- AWS Mobile SDK for Unity - Install the Cognito Identity (AWSSDK.IdentityManagement.X.X.X.X.unitypackage) Package (Tested with AWSSDK.IdentityManagement.3.3.2.3.unitypackage)
- Facebook SDK for Unity - (Tested with facebook-unity-sdk-7.9.4)
- Text Mesh Pro (Free) - For displaying a log (Tested with v1.0.55.0b7 - Mar 06 2017)
Work In Progress:
Currently only the signed (SigV4) POST and GET (with query params) methods works. The REST of the examples (pun intended) will be available soon.
Instructions
- After setting up the Api Gateway, copy the Api Gateway base path (with out the endpoints path)
- Paste it in the Api Gateway input field
- Enter the Api Gateway region in the input field right next to it.
- Enter the Facebook App Id in the Facebook input field
- Fill in the Cognito pool id and region in the cognito input fields
- Write a message and press Create.
Note: Other functions are not yet implemented - work in progress.