Description of changes:this.signInUserSession = this.getCachedSession(); is now run in the constructor of class CognitoAuth. After that line the token scopes are also set on this.signInUserSession. Once constructed, when calling getSession(), this line is currently run again: this.signInUserSession = this.getCachedSession();. If the browser has not cached the token scopes yet, they will be reset to an empty array.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available:
Description of changes:
this.signInUserSession = this.getCachedSession();
is now run in the constructor of classCognitoAuth
. After that line the token scopes are also set onthis.signInUserSession
. Once constructed, when callinggetSession()
, this line is currently run again:this.signInUserSession = this.getCachedSession();
. If the browser has not cached the token scopes yet, they will be reset to an empty array.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.