Skip to content

Commit

Permalink
make sure no attr is undefined in parseHash response
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Dec 7, 2016
1 parent a6c074e commit 1afbac5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/web-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ WebAuth.prototype.parseHash = function (hash, options) {
}

return {
accessToken: parsedQs.access_token,
accessToken: parsedQs.access_token || null,
idToken: parsedQs.id_token || null,
idTokenPayload: token && token.payload ? token.payload : null,
appStatus: token ? token.appStatus || null : null,
refreshToken: parsedQs.refresh_token,
state: parsedQs.state,
refreshToken: parsedQs.refresh_token || null,
state: parsedQs.state || null,
expiresIn: parsedQs.expires_in || null,
tokenType: parsedQs.token_type || null
};
Expand Down

0 comments on commit 1afbac5

Please sign in to comment.