Comparing version 1.0.188-beta.36 to 1.0.188-beta.37
@@ -46,3 +46,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
constructor(service, owner, options, __etc) { | ||
this.__version = '1.0.188-beta.36'; | ||
this.__version = '1.0.188-beta.37'; | ||
this.session = null; | ||
@@ -49,0 +49,0 @@ this.connection = null; |
@@ -90,2 +90,3 @@ import { CognitoUserAttribute, CognitoUser, CognitoUserSession } from 'amazon-cognito-identity-js'; | ||
getSession: (option?: { | ||
skipEventTrigger?: boolean; | ||
refreshToken?: boolean; | ||
@@ -92,0 +93,0 @@ _holdLogin?: boolean; |
@@ -104,3 +104,3 @@ import SkapiError from '../main/error'; | ||
this.log('getSession:option', option); | ||
let { refreshToken = false } = option || {}; | ||
let { refreshToken = false, skipEventTrigger = false } = option || {}; | ||
return new Promise((res, rej) => { | ||
@@ -129,3 +129,5 @@ cognitoUser = this.userPool.getCurrentUser(); | ||
getUserProfile(); | ||
this._runOnLoginListeners(this.user); | ||
if (!skipEventTrigger) { | ||
this._runOnLoginListeners(this.user); | ||
} | ||
return this.session; | ||
@@ -137,3 +139,5 @@ }); | ||
getUserProfile(); | ||
this._runOnLoginListeners(this.user); | ||
if (!skipEventTrigger) { | ||
this._runOnLoginListeners(this.user); | ||
} | ||
res(this.session); | ||
@@ -284,3 +288,3 @@ }; | ||
try { | ||
await authentication.bind(this)().getSession(options); | ||
await authentication.bind(this)().getSession(Object.assign({ skipEventTrigger: true }, options)); | ||
return this.user; | ||
@@ -287,0 +291,0 @@ } |
{ | ||
"name": "skapi-js", | ||
"version": "1.0.188-beta.36", | ||
"version": "1.0.188-beta.37", | ||
"description": "Skapi: Backend API for HTML frontend.", | ||
@@ -5,0 +5,0 @@ "main": "js/Main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3412264
9527