authorize
The authorize
action prompts the user for OAuth authorization. After the user has made a choice regarding authorization, you will receive an authorized
response. You can only send this action once per page load.
The author of the game must be the owner of the OAuth app for the game authorization flow to work.
returning response
parameters
-
client_id
(string)
The OAuth application client ID. The application must belong to the author of the game. -
scopes
(string[])
The scopes you are requesting authorization for. At this time, the only valid value for this is["userinfo"]
.
example
window.top.postMessage({
action: "authorize",
client_id: "J2Ijs5R4qaM",
scopes: ["userinfo"]
}, "https://galaxy.click");
see also
The info
response can be used to determine if the player is logged in.