check

check()

Checks whether there’s an identity in the active session, without throwing if there isn’t.

Return type:

boolean

Example

const identity = require('dcp/identity');

console.log(identity.check() ? 'Logged in' : 'Not logged in');