You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 29, 2025. It is now read-only.
Asking to update admin password even password is of 20 length and mfa issue #389
changed the title [-]Asking to update admin password even password is of 20 length [/-][+]Asking to update admin password even password is of 20 length and mfa issue[/+]on Nov 5, 2024
RangeError: Invalid key length
@calcom/web:start: at Cipheriv.createCipherBase (node:internal/crypto/cipher:122:19)
@calcom/web:start: at Cipheriv.createCipherWithIV (node:internal/crypto/cipher:141:3)
@calcom/web:start: at new Cipheriv (node:internal/crypto/cipher:249:3)
@calcom/web:start: at Object.createCipheriv (node:crypto:141:10)
@calcom/web:start: at symmetricEncrypt (/calcom/apps/web/.next/server/chunks/69559.js:1:278)
@calcom/web:start: at handler (/calcom/apps/web/.next/server/pages/api/auth/two-factor/totp/setup.js:1:3199) {
@calcom/web:start: code: 'ERR_CRYPTO_INVALID_KEYLEN'
@calcom/web:start: }
Reacted by purple_emily, Pasha Finkelshteyn and Pasha Sviderski
The ERR_CRYPTO_INVALID_KEYLEN can be solved by setting a 24 character encryption key for CALENDSO_ENCRYPTION_KEY using
openssl rand -base64 24
While that gets 2FA working, I'm still trying to figure out why admin access is not granted despite a password meeting length requirements and 2FA enabled.
Scratch that, the UI is just wonky. After setting up 2FA, you need to explicitly logout and log back in (possibly clearing site cookies after logging out), and then you'll get the admin controls and no banner.
I am (suddenly) experiencing this as well - even trying openssl rand -base64 24 doesn't seem to be working. I encounter both the banner to update the admin password, as well as the inability to add 2FA.
Activity
[-]Asking to update admin password even password is of 20 length [/-][+]Asking to update admin password even password is of 20 length and mfa issue[/+]ansulagrawal commentedon Nov 5, 2024
Here is the image of admin password error

ansulagrawal commentedon Nov 5, 2024
Below is the pic for mfa enable

Logs:
RangeError: Invalid key length
@calcom/web:start: at Cipheriv.createCipherBase (node:internal/crypto/cipher:122:19)
@calcom/web:start: at Cipheriv.createCipherWithIV (node:internal/crypto/cipher:141:3)
@calcom/web:start: at new Cipheriv (node:internal/crypto/cipher:249:3)
@calcom/web:start: at Object.createCipheriv (node:crypto:141:10)
@calcom/web:start: at symmetricEncrypt (/calcom/apps/web/.next/server/chunks/69559.js:1:278)
@calcom/web:start: at handler (/calcom/apps/web/.next/server/pages/api/auth/two-factor/totp/setup.js:1:3199) {
@calcom/web:start: code: 'ERR_CRYPTO_INVALID_KEYLEN'
@calcom/web:start: }
RuanAyram commentedon Jan 8, 2025
Up!
asm0dey commentedon Mar 12, 2025
Same for me!
ikigai-service-account commentedon May 15, 2025
Same for me
utopiafallen commentedon Jun 2, 2025
The
ERR_CRYPTO_INVALID_KEYLENcan be solved by setting a 24 character encryption key forCALENDSO_ENCRYPTION_KEYusingWhile that gets 2FA working, I'm still trying to figure out why admin access is not granted despite a password meeting length requirements and 2FA enabled.Scratch that, the UI is just wonky. After setting up 2FA, you need to explicitly logout and log back in (possibly clearing site cookies after logging out), and then you'll get the admin controls and no banner.
Fix secrets setup to resolve 2FA and encryption key issues
joecarpita commentedon Jul 26, 2025
I am (suddenly) experiencing this as well - even trying
openssl rand -base64 24doesn't seem to be working. I encounter both the banner to update the admin password, as well as the inability to add 2FA.