For the complete documentation index, see llms.txt. This page is also available as Markdown.
CMS

How do I reset 2FA with SQL?

Use this method when you cannot access the CMS to reset Two-Factor-Authentication.

Run a SQL query

Clear the 2FA data for a specific user by running a SQL query directly against the database.

  1. Locate the userId for the affected user in the User table

  2. Replace {yourUserId} in the script below with the actual ID.

  3. Run the following query:

UPDATE `user` 
SET 
    `twoFactorSecret` = NULL,
    `twoFactorTypeId` = 0,
    `twoFactorRecoveryCodes` = NULL
WHERE 
    userId = {yourUserId};

Last updated

Was this helpful?