Unable to enable 2FA on admin account
-
wrote on Sep 4, 2023, 1:43 PM last edited by 3699n Sep 4, 2023, 2:11 PM
After completing the admin onboarding process, Cal.com requests you to setup 2FA to be able to access Admin settings. Attempting to do so results in an error. See below:
Sep 04 13:40:27@calcom/web:start: RangeError: Invalid key length Sep 04 13:40:27@calcom/web:start: at Cipheriv.createCipherBase (node:internal/crypto/cipher:116:19) Sep 04 13:40:27@calcom/web:start: at Cipheriv.createCipherWithIV (node:internal/crypto/cipher:135:3) Sep 04 13:40:27@calcom/web:start: at new Cipheriv (node:internal/crypto/cipher:243:3) Sep 04 13:40:27@calcom/web:start: at Object.createCipheriv (node:crypto:141:10) Sep 04 13:40:27@calcom/web:start: at symmetricEncrypt (/run/calcom/apps/web/.next/server/chunks/13303.js:29:66) Sep 04 13:40:27@calcom/web:start: at handler (/run/calcom/apps/web/.next/server/pages/api/auth/two-factor/totp/setup.js:171:103) { Sep 04 13:40:27@calcom/web:start: code: 'ERR_CRYPTO_INVALID_KEYLEN' Sep 04 13:40:27@calcom/web:start: }
I would see this as quite an urgent issue as it prevents from adding new apps to the platform.
-
-
wrote on Sep 4, 2023, 2:24 PM last edited by
@nebulon It seems this issue is caused by incorrectly generated NEXTAUTH_SECRET and CALENDSO_ENCRYPTION_KEY
-
Good catch! I've updated the package to generate an encryption key with the correct length now. If you already have the app installed, you can either reinstall or also deleting the file
.calendso_encryption_key
then restart the app to have it regenerated. -
-
I wasn't ultimately able to get this to work, but uninstalling and reinstalling the Cal.com app from the Cloudron App Store gave me access to the admin onboarding flow, which did let me set up Google Calendar correctly.
wrote on Sep 10, 2023, 7:17 PM last edited by(Please ignore my previous comment. It was intended for a different thread.)