assets/scripts/core.js in bfdotcom-theme-0.2.0 vs assets/scripts/core.js in bfdotcom-theme-0.2.1
- old
+ new
@@ -2,11 +2,11 @@
myWindow=window.open(auth_url + '/login?response_type=token&client_id=' + user_pool_client_id + '&redirect_uri=https://' + window.location.hostname + '/assets/auth/signin.html','','width=600,height=600')
myWindow.focus()
}
function refreshLogin(id_token) {
- localStorage.setItem("id_token", credentials.accessKeyId)
+ localStorage.setItem("id_token", id_token)
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: identity_pool_id,
Logins: {
['cognito-idp.' + aws_region + '.amazonaws.com/' + user_pool_id]: id_token
@@ -86,8 +86,8 @@
function addMinutes(date, minutes) {
return new Date(date + minutes*60000)
}
-$(document).onload(function() {
+$(document).ready(function() {
refreshSignedInStatus()
})