-
-
Notifications
You must be signed in to change notification settings - Fork 137
Feature addition: Multi-Factor Authentication #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is super cool, thanks for doing this. Is it also possible to configure the I'll also review the additional routes for the OTP. |
@perfectra1n the environment variables can be set with environment variables (ie export TOTP_ENABLED="true"), -e with docker, and in a .env file in the root directory. Honestly I forgot to update documentation. Whoops! edit: I'm working on adding some pages now. |
Docs complete here. |
TOTP is moved out from config.ini, and OAuth is still there for security concern. I think now it makes more sense now. |
so happy to see this happening, thank you. Is hardware auth like Yubikey or fingerprint reader part of this or would that be an additional feature? |
I think that will be an additional feature then, at least won't in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, @JYC333 ! :)
src/public/app/widgets/type_widgets/abstract_code_type_widget.ts
Outdated
Show resolved
Hide resolved
src/public/app/widgets/type_widgets/options/multi_factor_authentication.ts
Outdated
Show resolved
Hide resolved
For TOTP_ENABLED and TOTP_SECRET - I believe that these variable names should be prepended with TRILIUM_ with our release of environment variables since this PR was created. |
TOTP_ENABLED and TOTP_SECRET are removed from settings, and let user to config through option page. The settings that required for OAuth need to set through |
Features added
Documentation
Testing Instructions
TOTP
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
Environment variable (linux)
Docker
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.