in lib/index.js [36:54]
init() {
const creds = this.checkForCredentials();
if (creds) {
display('CREDENTIALS', creds);
return this.send();
}
const token = this.checkForToken();
if (token) {
display('TOKEN', decodeToken(token));
this.credentials.setToken(token);
const $this = this;
this.credentials.get(creds => {
const headers = $this.getCookies(token, creds, $this.token.user);
return $this.setCookies(headers);
});
} else {
return this.redirect();
}
}