Change MFA check to use UTC to prevent issues with daylight saving times

Today, my YubiKey didn’t work in my self-hosted environment. When I attached the YubiKey to my vault, it was winter time. When I used it today (summer time), the YubiKey wasn’t recognized. When I changed the time back to wintertime, the YubiKey worked fine again. Is it possible to always do checks based on UTC (or find another solution for daylight saving times)?

@Frederique Welcome to the forum!

My experience does not match yours, so it would be helpful if you could provide more detail about your situation. Personally, I had configured 3 YubiKeys to use as my Bitwarden 2FA (using FIDO2/WebAuthn), and this was done in wintertime. Currently, we are on daylight savings time, and I have not experienced any problems using the YubiKeys with Bitwarden.

How exactly did you set up the 2FA? Are you using YubiKey OTP, Yubico Authenticator TOTP, or FIDO2/WebAuthn?

What error message do you see, and at what part of the authentication ceremony does it occur? Are you still getting the same error when you switch your device clock back to summer time?

You have selected the self-hosting tag. Please provide more information about your set-up. What server version is shown in the dashboard when you log in to the Bitwarden Administrator Portal? What client app are you using (Desktop, Web Vault, browser extension, CLI, or mobile), and what version? What is the operating system of your server and of your client device?