chrome.loginState
Description: |
Use the chrome.loginState API to read and monitor the login
state.
|
Availability: |
Since Chrome 78.
|
Permissions: |
"loginState"
|
Important: This API works only on Chrome OS.
Summary
Types | |
---|---|
SessionState | |
Methods | |
getProfileType −
chrome.loginState.getProfileType(function callback)
| |
getSessionState −
chrome.loginState.getSessionState(function callback)
| |
Events | |
onSessionStateChanged |
Types
SessionState
Enum |
---|
|
Methods
getProfileType
chrome.loginState.getProfileType(function callback)
Gets the type of the profile the extension is in.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
The callback parameter should be a function that looks like this: function(enum of
|
getSessionState
chrome.loginState.getSessionState(function callback)
Gets the current session state.
Parameters | |||||
---|---|---|---|---|---|
function | callback |
The callback parameter should be a function that looks like this: function( SessionState result) {...};
|
Events
onSessionStateChanged
Dispatched when the session state changes. sessionState
is the new session state.
addListener
chrome.loginState.onSessionStateChanged.addListener(function callback)
Parameters | |||||
---|---|---|---|---|---|
function | callback |
The callback parameter should be a function that looks like this: function( SessionState sessionState) {...};
|