Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Conversation

@chesspro13
Copy link
Contributor

@chesspro13 chesspro13 commented May 27, 2024

Features added

  • TOTP (Time-based One-Time Password) with recovery codes
  • OAuth/OpenID sign on

To test TOTP:
You will need some sort of authentication app/extension prior to testing.

  1. Go to "Options" -> "MFA"
  2. Check the "Enable TOTP" checkbox
  3. Click the "Generate TOTP Secret" button
  4. Copy the generated secret to your authentication app/extension
  5. Click the "Generate Recovery Codes" button
  6. Copy the recovery codes. Recovery codes can only be used once in place of TOTP and will say the date/time they were used in zulu time on subsequent visits to this page.
  7. Save the secret in .env under "TOTP_SECRET"
  8. Restart trilium.
  9. Logout or navigate to login page. You can now use the TOTP or recovery codes to login.

To test Oauth/OpenID
You will need to setup a authentication provider. I tested with Authentik, Google, and 0Auth. This requires a bit of extra setup. Linked here is how to test this with Google.

  1. Setup Google or another provider. The key bits of information needed are
  1. Go to "Options" -> "MFA"
  2. Check the "Enable Oauth/OpenID" checkbox
  3. Click the "Login to Configured OAuth Service" button. It should redirect you to the authentication provider.
  4. When you are redirected back, click the "Save User" button. It should show a toast with the user you logged in as for your provider.
  5. You can now login and out with the service provider and should be able to login and logout without using your password.

@chesspro13 chesspro13 marked this pull request as draft May 31, 2024 23:52
@eliandoran eliandoran force-pushed the develop branch 5 times, most recently from eff61af to 4090386 Compare August 10, 2024 11:14
@eliandoran
Copy link
Contributor

@chesspro13 , why close the PR?

@chesspro13
Copy link
Contributor Author

@eliandoran I had trouble making it merge with develop, so I started fresh on a new branch. PR #401 is the successor.

@JYC333 JYC333 deleted the OIDC branch April 2, 2025 13:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants