Skip to content

Commit

Permalink
fix(auth): fix auth silent renewal
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Mar 27, 2018
1 parent 95d5571 commit f41cba9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/common/user/Auth0Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ class Auth0Manager {
browserHistory.push('/')
}
this.removeToken()
this.getLock().logout({
returnTo: window.location.origin
})
const {origin} = window.location
window.location.replace(`https://${domain}/v2/logout?returnTo=${origin}&client_id=${clientID}`)
}

/**
Expand Down Expand Up @@ -209,7 +208,7 @@ class Auth0Manager {
const err = new Error('accessToken not received from auth0')
console.log(authResult)
reject(err)
} else if (!nonceMatches(authResult.accessToken, nonce)) {
} else if (!nonceMatches(authResult.idToken, nonce)) {
const err = new Error('Nonce string does not match!')
reject(err)
} else {
Expand Down

0 comments on commit f41cba9

Please sign in to comment.