3

I am developing a "Single app Chrome kioskā€ for digital signage application. I already have a Chrome device management license and want to set a username and password remotely (from Google Admin through the configuration text file) for each chrome OS to display different content accordingly.

The problem after uploading the configuration file from the google admin the returned value from chrome.storage.managed.get('authentication') is empty

enter image description here

I have already setup the manifest.json and schema.json too and uploaded the configuration file from google admin

in the manifest.json is

"storage": {
    "managed_schema": "schema.json"
  }

the schema.json

{
    "type": "object",
    "properties": {
        "authentication": {
            "type": "object",
            "properties": {
                "username": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                }
            }
        }
    }
}

and the uploaded configuration file is as follows

{
  "authentication": {
    "Value": {
      "username": {
        "Value": "testScreen"
      },
      "password": {
        "Value": "test1234$"
      }
    }
  }
}

and my code that reads

chrome.storage.managed.get('authentication', function (data) {
    const credentials = {
         username: data.username,
         password: data.password
     };
});

I'm expecting to get the response data to be an object data = { username: 'testScreen', password: 'test123$'}

what I'm actually getting is data = {}; empty object.

htshame
  • 6,599
  • 5
  • 36
  • 56
M.Majali
  • 31
  • 1

0 Answers0