How to reset 2FA for Confluence: U2F & TOTP length of the "Secure Key" by directly accessing the database?

 

Should you ever change secure key length, we provide a solution to restore it:

Step 1. Connect to your database using a database management tool with the fields, as described in the Database connection fields.

Step 2. Execute the SQL script: UPDATE BANDANA SET BANDANAVALUE='<string>8</string>' WHERE BANDANAKEY='authKeySize';