GameKit Cognito user registration through the web user portal


Hello Everyone,

We have gameKit setup for unreal Engine game and managing username passwords via gamekit.

However we also want to allow game users to register through user portal.

When user registers from game, in AWS cognito via gamekit, there are two user variables created

  • gk_user_id
  • gk_user_hash_key

However above two variables are not generated when user registers via webpage.

We have already configured cognito.

Is there any way , we can get custom variables gk_user_id and gk_user_hash_key generated via webpage registration ?

Thank you

  • 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.


asked 2 years ago312 views
1 Answer

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:

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?

answered 2 years ago
profile picture
reviewed 18 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions