Chrome extension identity.email empty

前端 未结 2 724
失恋的感觉
失恋的感觉 2020-12-03 22:26

I am trying to get email and id of user through chrome identity api.

I am doing this

  chrome.identity.getProfileUserInfo(function(userinfo){
    con         


        
2条回答
  •  春和景丽
    2020-12-03 23:08

    The getProfileUserInfo documentation says:

    • email: Empty if the user is not signed in or the identity.email manifest permission is not specified.
    • id: Empty if the user is not signed in or (in M41+) the identity.email manifest permission is not specified.

    Edit manifest.json to include both permissions:

    "permissions": ["identity", "identity.email"]
    

提交回复
热议问题