blinkSDK.onAuthenticationChange()
Register an application-side callback to get notified for changes in Blink authentication status.
Usage
blinkSDK.onAuthenticationChange(
(response) => {
if (response.authenticated) {
// App-side logic when Blink user is authenticated
} else {
// App-side logic when Blink user is not authenticated
}
},
true
);
Signature
blinkSDK.onAuthenticationChange(callback, [runAtStart])
Parameters
| parameter | type | required | description |
|---|---|---|---|
callback | function | ☑ | Called whenever the authentication status changes, will receive a response object |
runAtStart | function | ☐ | Executes the callback once right after registering, dafaults to false |
Returns
void
Objects definitions
Response object
{
"authenticated" : // authentication status
}
| name | type | description |
|---|---|---|
authenticated | boolean | Authentication status |