Skip to content

Commit 2e8cf7c

Browse files
committed
fix: update device session fields
1 parent 2ff1ebd commit 2e8cf7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

persistence/sql/persister_device.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ func (p *Persister) UpdateDeviceCodeSessionBySignature(ctx context.Context, sign
187187
}
188188

189189
stmt := fmt.Sprintf(
190-
"UPDATE %s SET granted_scope=?, granted_audience=?, session_data=?, user_code_state=? WHERE device_code_signature=? AND nid = ?",
190+
"UPDATE %s SET granted_scope=?, granted_audience=?, session_data=?, user_code_state=?, subject=?, challenge_id=? WHERE device_code_signature=? AND nid = ?",
191191
sqlTableDeviceAuthCodes,
192192
)
193193

194194
/* #nosec G201 table is static */
195-
err = p.Connection(ctx).RawQuery(stmt, req.GrantedScope, req.GrantedAudience, req.Session, req.UserCodeState, signature, p.NetworkID(ctx)).Exec()
195+
err = p.Connection(ctx).RawQuery(stmt, req.GrantedScope, req.GrantedAudience, req.Session, req.UserCodeState, req.Subject, req.ConsentChallenge, signature, p.NetworkID(ctx)).Exec()
196196
if err != nil {
197197
return sqlcon.HandleError(err)
198198
}

0 commit comments

Comments
 (0)