Created
June 11, 2022 01:40
-
-
Save taksan/c0d72532f9ed23938b1da2d22b71aedc to your computer and use it in GitHub Desktop.
Setup WA OpenID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To setup Work Adventure to authenticate with google oauth: | |
If you still don't have an Oauth Client: | |
- Access https://console.developers.google.com/ and create a project | |
- Setup the OAuth Consent Screen | |
- Go to credentials and create a new credential of type "Oauth Client ID" | |
- Under "Authorized Redirection URLs" make sure to fill with your Work Adventure full domain (https://play...) | |
- Save the configuration | |
- Next, you can either download the credentials or edit the credential. You will need the Cliend ID and the Client Secret | |
Now, you should have the required information to setup Work Adventure. You will need to set the following variables: | |
``` | |
OPID_CLIENT_ID=<fill with the Client ID from previous step> | |
OPID_CLIENT_SECRET=<fill with the Client Secret from previous step> | |
OPID_CLIENT_ISSUER=https://accounts.google.com | |
OPID_CLIENT_REDIRECT_URL= | |
OPID_LOGIN_SCREEN_PROVIDER=https://<push domain>/login-screen | |
OPID_PROFILE_SCREEN_PROVIDER= | |
DISABLE_ANONYMOUS=true | |
OPID_SCOPE="openid email profile" | |
OPID_USERNAME_CLAIM="given_name" | |
OPID_LOCALE_CLAIM="locale" | |
``` | |
OPID_USERNAME_CLAIM will specify which attributes from user profile will be used to name the user in the game. | |
Other possible values are `name`, `last_name` and so on. | |
The variables that are unset are not required to make the authentication work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fill the following:
OPID_PROFILE_SCREEN_PROVIDER=https://www.googleapis.com/auth/userinfo.profile
It will become mandatory soon