web/flows: fix authenticator_validate device select not sent to backend (#5638)

This commit is contained in:
tograss 2023-05-16 22:55:59 +02:00 committed by GitHub
parent 5eba598584
commit daa3c91afc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,9 +53,10 @@ export class AuthenticatorValidateStage
_selectedDeviceChallenge?: DeviceChallenge; _selectedDeviceChallenge?: DeviceChallenge;
set selectedDeviceChallenge(value: DeviceChallenge | undefined) { set selectedDeviceChallenge(value: DeviceChallenge | undefined) {
const previousChallenge = this._selectedDeviceChallenge;
this._selectedDeviceChallenge = value; this._selectedDeviceChallenge = value;
if (!value) return; if (!value) return;
if (value === this._selectedDeviceChallenge) return; if (value === previousChallenge) return;
// We don't use this.submit here, as we don't want to advance the flow. // We don't use this.submit here, as we don't want to advance the flow.
// We just want to notify the backend which challenge has been selected. // We just want to notify the backend which challenge has been selected.
new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolve({ new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolve({