@ecomplus/passport-client
Version:
Handle customer authentication with E-Com Plus Passport
17 lines (13 loc) • 311 B
JavaScript
/**
* @method
* @name EcomPassport#checkAuthorization
* @description Check session auth level (does not validate token).
*
* @returns {boolean}
*
* @example
ecomPassport.checkAuthorization()
*/
export default ({ session, checkLogin }) => {
return Boolean(checkLogin() && session.auth.level >= 2)
}