- Newest
- Most votes
- Most comments
Hi PeterS,
Thanks for asking this question.
Unfortunately the Cognito Web Portal only allows you to customize the UI, but not the playload it sends. So the web portal can't create the custom attributes gk_user_id
and gk_user_hash_key
for the user.
I would recommend creating your own web portal and have it make a POST request to a custom Lambda function that does the registration. Inside the Lambda function you would do this logic: https://github.com/aws/aws-gamekit/blob/main/aws-gamekit-identity/source/aws/gamekit/identity/gamekit_identity.cpp#L41-L100
Alternatively, you could try modifying the CognitoPreSignup and CognitoPostConfirmation Lambda functions so they generate the two custom attributes if they are missing from the request (since they are missing from the web portal requests). Here's how to generate the attributes in a Lambda function.
I've created an internal feature request to add support for doing website based user registration and login. To help make sure this request meets your needs, would you mind explaining your use case more? Are you only trying to do registration through the web portal? Or do you also want players to log in through the web portal (i.e. player loads game, logs in through website, then plays game)? Anything else?
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Has this functionality been added?
We are building out our business logic and looking hard at AWS GameKit, but we really need user registration and login. We have game data that will need to be viewed by each user based on subscription options.
Thanks!