onLogin

User has successfully completed the login process. Details about the login result are passed in the data.loginResponse member of the Response object.

Data Members:

PropertyTypeDescription
jwtobjectResult of the user authentication represented as a JSON Web Token (JWT)
userinfoobjectUserinfo for the authenticated user
startPlayModebooleanApplicable to minor authentications that were successful, however, the minor user has not yet received parent consent (value of true).

Sample response:

{
    "jwt": {
        "access_token": "eyJraWQiOiJyc2ExIiwiYWxnI...s_Epf8ux2B40", 
        "token_type": "Bearer", 
        "state": "SOMELOCALSTATE",
        "expires_in": "86399999",
        "id_token": "eyJr...XM5iotrg"
    },
    "startPlayMode": false,
    "userinfo": {    
        "sub": "386a354e4d364364674f4e2f562b4930617477564f773d3d", 
        "name": "Bob Rose",
        "given_name": "Bob",
        "family_name": "Rose",
        "picture": "https://somelocation.jpg",
        "zoneinfo": "America/New_York",
        "locale": "en_US",
        "updated_at": "1501503836",
        "role_identifier": "STANDARD_PARENT_1",
        "minor": false,
        "teen": false,
        "teacher": false,
        "student": false,
        "approved": true,
        "shadow_account": false,
        "site_token": "495059377358756a7362486b687a52485462415775673d3d",
        "permissions": [
          {
            "on": true,
            "consent_time": 1501300800,
            "request_time": 1501361767,
            "feature_active": true,
            "feature_id": 1531,
            "feature_identifier": "PRIVO-101",
            "feature_category": "Standard",
            "feature_name": "Tier A_0 - Starter Account",
            "attributes": [
              {
                "id": 118305,
                "value": "blue",
                "attributeName": "favColor"
              }
            ]
          }
        ],
        "activation_time": 1501364746,
        "verification_tier": "G",
        "user_profile": {
          "role_identifier": "STANDARD_PARENT_1",
          "site_token": "495059377358756a7362486b687a52485462415775673d3d",
          "minor": false,
          "teen": false,
          "teacher": false,
          "student": false,
          "approved": true,
          "shadow_account": false,
          "activation_time": 1501364746,
          "verification_tier": "G",
          "attributes": [
            {
              "id": 118305,
              "value": "blue",
              "attributeName": "favColor"
            },
            {
              "id": 118304,
              "value": "1",
              "attributeName": "favorite.cars"
            }
          ],
          "display_names": []
        }
      }
}