diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html index f9a809a86..8145def6a 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html @@ -1,5 +1,3 @@ -

Note: This feature has not been merged yet, so it is not available. -

Multi-factor authentication (MFA) is a security process that requires users to provide two or more verification factors to gain access to a system, application, or account. This adds an extra layer of protection beyond @@ -7,80 +5,60 @@

By requiring more than one verification method, MFA helps reduce the risk of unauthorized access, even if someone has obtained your password. It’s highly recommended for securing sensitive information stored in your notes.

-

Warning! OpenID and TOTP cannot be both used at the same time!

-

Log in with your Google Account with OpenID!

-

OpenID is a standardized way to let you log into websites using an account - from another service, like Google, to verify your identity.

-

Why Time-based One Time Passwords?

-

TOTP (Time-Based One-Time Password) is a security feature that generates - a unique, temporary code on your device, like a smartphone, which changes - every 30 seconds. You use this code, along with your password, to log into - your account, making it much harder for anyone else to access them.

-

Setup

-

TOTP

-
    -
  1. -

    Start Trilium Notes normally.

    -
  2. -
  3. -

    Go to "Menu" -> "Options" -> "MFA"

    -
  4. -
  5. -

    Click the "Generate TOTP Secret" button

    -
  6. -
  7. -

    Copy the generated secret to your authentication app/extension

    -
  8. -
  9. -

    Set an environment variable "TOTP_SECRET" as the generated secret. Environment - variables can be set with a .env file in the root directory, by defining - them in the command line, or with a docker container.

    # .env in the project root directory
    -TOTP_ENABLED="true"
    -TOTP_SECRET="secret"
    # Terminal/CLI
    -export TOTP_ENABLED="true"
    -export TOTP_SECRET="secret"
    # Docker
    -docker run -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e TOTP_ENABLED="true" -e TOTP_SECRET="secret" triliumnext/notes:[VERSION]
    -
  10. -
  11. -

    Restart Trilium

    -
  12. -
  13. -

    Go to "Options" -> "MFA"

    -
  14. -
  15. -

    Click the "Generate Recovery Codes" button

    -
  16. -
  17. -

    Save the recovery codes. Recovery codes can be used once in place of the +

    +

    Log in with your Google Account with OpenID!

    +

    OpenID is a standardized way to let you log into websites using an account + from another service, like Google, to verify your identity.

    +

    Why Time-based One Time Passwords?

    +

    TOTP (Time-Based One-Time Password) is a security feature that generates + a unique, temporary code on your device, like a smartphone, which changes + every 30 seconds. You use this code, along with your password, to log into + your account, making it much harder for anyone else to access them.

    +

    Setup

    +

    MFA can only be set up on a server instance.

    + +

    TOTP

    +
      +
    1. Go to "Menu" -> "Options" -> "MFA"
    2. +
    3. Click the “Enable Multi-Factor Authentication” checkbox if not checked
    4. +
    5. Choose “Time-Based One-Time Password (TOTP)” under MFA Method
    6. +
    7. Click the "Generate TOTP Secret" button
    8. +
    9. Copy the generated secret to your authentication app/extension
    10. +
    11. Click the "Generate Recovery Codes" button
    12. +
    13. Save the recovery codes. Recovery codes can be used once in place of the TOTP if you loose access to your authenticator. After a rerecovery code is used, it will show the unix timestamp when it was used in the MFA options - tab.

      -
    14. -
    15. -

      Load the secret into an authentication app like google authenticator

      -
    16. -
    -

    OpenID

    -

    Currently only compatible with Google. Other services like Authentik and Auth0 are planned on being added. -

    -

    In order to setup OpenID, you will need to setup a authentication provider. - This requires a bit of extra setup. Follow these instructions to - setup an OpenID service through google.

    -

    Set an environment variable "SSO_ENABLED" to true and add the client ID - and secret you obtained from google. Environment variables can be set with - a .env file in the root directory, by defining them in the command line, - or with a docker container.

    -

    .env File

    # .env in the project root directory
    -SSO_ENABLED="true"
    -BASE_URL="http://localhost:8080"
    -CLIENT_ID=
    -SECRET=
    -

    Environment variable (linux)

    export SSO_ENABLED="true"
    -export BASE_URL="http://localhost:8080"
    -export CLIENT_ID=
    -export SECRET=
    -

    Docker

    docker run -d -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e SSO_ENABLED="true" -e BASE_URL="http://localhost:8080" -e CLIENT_ID= -e SECRET= triliumnext/notes:[VERSION]
    -

    After you restart Trilium Notes, you will be redirected to Google's account - selection page. Login to an account and Trilium Next will bind to that - account, allowing you to login with it.

    -

    You can now login using your google account.

    \ No newline at end of file + tab.
  18. +
  19. Re-login will be required after TOTP setup is finished (After you refreshing + the page).
  20. +
+

OpenID

+ +

In order to setup OpenID, you will need to setup a authentication provider. + This requires a bit of extra setup. Follow these instructions to + setup an OpenID service through google.

+
    +
  1. Set the oauthBaseUrl, oauthClientId and oauthClientSecret in + the config.ini file (check Configuration (config.ini or environment variables) for + more information). +
      +
    1. You can also setup through environment variables (TRILIUM_OAUTH_BASE_URL, TRILIUM_OAUTH_CLIENT_ID and TRILIUM_OAUTH_CLIENT_SECRET).
    2. +
    +
  2. +
  3. Restart the server
  4. +
  5. Go to "Menu" -> "Options" -> "MFA"
  6. +
  7. Click the “Enable Multi-Factor Authentication” checkbox if not checked
  8. +
  9. Choose “OAuth/OpenID” under MFA Method
  10. +
  11. Refresh the page and login through OpenID provider
  12. +
\ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html index d84f08784..95e10fd24 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Code.html @@ -40,7 +40,7 @@

Color schemes

Since Trilium 0.94.0 the colors of code notes can be customized by going  Options → Code Notes and looking for the Appearance section.

+ class="reference-link" href="#root/_help_4TIF1oA4VQRO">Options → Code Notes and looking for the Appearance section.