File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,12 +45,12 @@ class Session {
4545 /**
4646 * @param response {AuthenticationResponse}
4747 *
48- * @returns {Session }
48+ * @returns {Session } RelyingParty Session object
4949 */
5050 static fromAuthResponse ( response ) {
5151 const RelyingParty = require ( './RelyingParty' ) // import here due to circular dep
5252
53- let payload = response . decoded . payload
53+ let idClaims = response . decoded && response . decoded . payload || { }
5454
5555 let { rp } = response
5656
@@ -65,14 +65,14 @@ class Session {
6565 let options = {
6666 credentialType,
6767 sessionKey,
68- issuer : payload . iss ,
68+ issuer : idClaims . iss ,
69+ idClaims,
6970 authorization : {
7071 client_id : registration [ 'client_id' ] ,
7172 access_token : response . params [ 'access_token' ] ,
7273 id_token : response . params [ 'id_token' ] ,
7374 refresh_token : response . params [ 'refresh_token' ]
74- } ,
75- idClaims : response . decoded && response . decoded . payload ,
75+ }
7676 }
7777
7878 return Session . from ( options )
You can’t perform that action at this time.
0 commit comments