Skip to content

Build your personal knowledge base with Trilium Notes

add support for Bearer auth

Yiran Lu22f1feece3b0
diff --git a/src/services/etapi_tokens.ts b/src/services/etapi_tokens.ts
index 93d916a60c..031856f2a7 100644
--- a/src/services/etapi_tokens.ts
+++ b/src/services/etapi_tokens.ts
@@ -48,6 +48,11 @@ function parseAuthToken(auth: string | undefined) {
auth = basicAuthChunks[1];
}
+ if (auth.startsWith("Bearer ")) {
+ // allow also bearer auth format
+ auth = auth.substring(7);
+ }
+
const chunks = auth.split("_");
if (chunks.length === 1) {