Skip to content

Commit 7be71fc

Browse files
authored
Merge pull request #401 from TriliumNext/feature/MFA
Feature addition: Multi-Factor Authentication
2 parents 96d3d66 + ed58be1 commit 7be71fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1748
-1442
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ data-docs/backup
4242
data-docs/log
4343
data-docs/session
4444
data-docs/session_secret.txt
45-
data-docs/document.*
45+
data-docs/document.*

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Feel free to join our official conversations. We would love to hear what feature
3737
* Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/note-hoisting)
3838
* Seamless [note versioning](https://triliumnext.github.io/Docs/Wiki/note-revisions)
3939
* Note [attributes](https://triliumnext.github.io/Docs/Wiki/attributes) can be used for note organization, querying and advanced [scripting](https://triliumnext.github.io/Docs/Wiki/scripts)
40+
* Direct OpenID and TOTP integration for more secure login
4041
* [Synchronization](https://triliumnext.github.io/Docs/Wiki/synchronization) with self-hosted sync server
4142
* there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting)
4243
* [Sharing](https://triliumnext.github.io/Docs/Wiki/sharing) (publishing) notes to public internet

config-sample.ini

+14-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,17 @@ cookieMaxAge=1814400
4343
[Sync]
4444
#syncServerHost=
4545
#syncServerTimeout=
46-
#syncServerProxy=
46+
#syncServerProxy=
47+
48+
[MultiFactorAuthentication]
49+
# Set the base URL for OAuth/OpenID authentication
50+
# This is the URL of the service that will be used to verify the user's identity
51+
oauthBaseUrl=
52+
53+
# Set the client ID for OAuth/OpenID authentication
54+
# This is the ID of the client that will be used to verify the user's identity
55+
oauthClientId=
56+
57+
# Set the client secret for OAuth/OpenID authentication
58+
# This is the secret of the client that will be used to verify the user's identity
59+
oauthClientSecret=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-- Add the oauth user data table
2+
CREATE TABLE IF NOT EXISTS "user_data"
3+
(
4+
tmpID INT,
5+
username TEXT,
6+
email TEXT,
7+
userIDEncryptedDataKey TEXT,
8+
userIDVerificationHash TEXT,
9+
salt TEXT,
10+
derivedKey TEXT,
11+
isSetup TEXT DEFAULT "false",
12+
UNIQUE (tmpID),
13+
PRIMARY KEY (tmpID)
14+
);

db/schema.sql

+13
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,19 @@ CREATE TABLE IF NOT EXISTS "attachments"
126126
utcDateScheduledForErasureSince TEXT DEFAULT NULL,
127127
isDeleted INT not null,
128128
deleteId TEXT DEFAULT NULL);
129+
CREATE TABLE IF NOT EXISTS "user_data"
130+
(
131+
tmpID INT,
132+
username TEXT,
133+
email TEXT,
134+
userIDEncryptedDataKey TEXT,
135+
userIDVerificationHash TEXT,
136+
salt TEXT,
137+
derivedKey TEXT,
138+
isSetup TEXT DEFAULT "false",
139+
UNIQUE (tmpID),
140+
PRIMARY KEY (tmpID)
141+
);
129142
CREATE INDEX IDX_attachments_ownerId_role
130143
on attachments (ownerId, role);
131144

images/google-logo.svg

+7
Loading

0 commit comments

Comments
 (0)