Google

circle-info

The Google platform needs to be enabled and configured in the Web Console before it can be used in your game.

Configuration

To start using Sign in with Google we first need to configure our integration in the platform settingsarrow-up-right.

Client ID

Client ID can be retrieved from the Google Dev Consolearrow-up-right. If you don't have an OAuth2 Client ID, you will have to create one.

Start Session

You need to acquire a Google Identity Tokenarrow-up-right to be able to start a Google session, but once you have that, simply follow along to the code snippet below. In the response from LootLocker you will find a refresh token which can be used to refresh the session so that you do not need to do the full sign-in flow each time.

Refresh Session

With Google authentication, you can refresh the session instead of having the player do a full sign-in every time. The request will return a 401 (Unauthorized) if the refresh token has expired, in which case you will need to start a new session.

circle-check

Last updated