Enhance logging during authentication (#163)

This commit is contained in:
Bubka
2023-03-16 13:25:43 +01:00
parent 960d1ca5f9
commit 9913560787
8 changed files with 39 additions and 9 deletions

View File

@@ -57,12 +57,12 @@ class WebAuthnManageController extends Controller
// no more registered device exists.
// See #110
if (blank($user->webAuthnCredentials()->WhereEnabled()->get())) {
Log::notice('No Webauthn credential enabled, Webauthn settings reset to default');
$request->user()->preferences['useWebauthnOnly'] = false;
$request->user()->save();
Log::notice(sprintf('No more Webauthn credential for user ID #%s, user Webauthn options reset to default', $user->id));
}
Log::info('Security device deleted');
Log::info(sprintf('User ID #%s revoked a security device', $user->id));
return response()->json(null, 204);
}