krapio
Library referenceTypes

OAuthTokens

type OAuthTokens = {
  access_token: string;
  expires_in: number;
  refresh_token: string;
  scope: string;
  sub: string;
  token_type: "Bearer";
};

the reply of POST /oauth/token, for a code exchange and for a refresh

Properties

PropertyTypeDescription
access_tokenstringkat_..., opaque, good for expires_in seconds
expires_innumberseconds, 3600
refresh_tokenstringkrt_..., works once: every refresh answers with a new one
scopestringspace separated, what the player actually granted; can be less than what was asked for
substringthe player's subject id in this app
token_type"Bearer"-

On this page