mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
gdm/util: Cleanup CredentialManager on successful verification
CredentialManagers emit a user-authenticated signal with a token
upon a successful authentication. This marks the service as preempting
and will be used for the next login/unlock request. However, the
preempting service is not cleaned after a successful verification.
As a consequence, it will be picked on a second unlock request.
This doesn't happen after a succesful login request because there
is a transition from the gnome-shell process owened by GDM to the
one owned by the user.
Clean the preempting service on a successful verification, like we
do when the PAM conversation stops.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3291>
(cherry picked from commit 258ad57b87)
This commit is contained in:
parent
e0ef898d75
commit
406d5f29f0
1 changed files with 8 additions and 1 deletions
|
|
@ -660,7 +660,14 @@ export class ShellUserVerifier extends Signals.EventEmitter {
|
||||||
this.emit('reset');
|
this.emit('reset');
|
||||||
}
|
}
|
||||||
|
|
||||||
_onVerificationComplete() {
|
_onVerificationComplete(_client, serviceName) {
|
||||||
|
const isCredentialManager = !!this._credentialManagers[serviceName];
|
||||||
|
const isForeground = this.serviceIsForeground(serviceName);
|
||||||
|
if (isCredentialManager && isForeground) {
|
||||||
|
this._credentialManagers[serviceName].token = null;
|
||||||
|
this._preemptingService = null;
|
||||||
|
}
|
||||||
|
|
||||||
this.emit('verification-complete');
|
this.emit('verification-complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue