How to configure OIDC with external server? #6318
Replies: 7 comments 5 replies
-
You need to set the environment variable TRILIUM_OAUTH_ISSUER_BASE_URL to your external OIDC server's issuer/discovery URL. If this variable isn't set, Trilium defaults to Google's OIDC endpoints, which is why you're being redirected there even though the login button shows your provider's name. Here's the full set of required variables for external OIDC:
Make sure all of these are set. If it still doesn't work, check the logs for missing variable warnings or errors—Trilium checks for all required variables and will list any that are missing or empty. There isn't official documentation for this setup yet, but the code confirms these are the correct variables and explains the fallback to Google if the issuer URL is missing. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response. With your guidance I got it working, but there is an issue. My auth server doesn't use RSA256. It uses EdDSA. Please consider adding an environment variable to set the Alg used. Thank you. "unexpected JWT alg received, expected RS256, got: EdDSA" Note, immich has a field to set the Alg, but nextcloud OIDC app does not, but still works out of the box. So for now, I have to set it back to using TOTP codes. :( |
Beta Was this translation helpful? Give feedback.
-
@whisperdancer I am using PocketID, but struggling with the Callback URL configuration. Do you have a hint for the URL format? TIA! |
Beta Was this translation helpful? Give feedback.
-
After trial and error it worked using "https://trilium.domain.tld/callback" as Callback URL. Hope it helps <3 |
Beta Was this translation helpful? Give feedback.
-
Appreciate your response <3 Was experiencing:
Edit: After fixing my NPM config, see this error now
|
Beta Was this translation helpful? Give feedback.
-
I'm trying to set this up as well (and Trilium itself), but am stuck, as the ENV variables are not propagated to the config.ini. |
Beta Was this translation helpful? Give feedback.
-
I got it working, but unfortunately trilium only supports a weaker legacy alg rsa256. I'm hopeful the devs will add support for additional algs like EdDSA, which is much smaller footprint, faster and significantly more secure. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The last update added support for external OIDC server. I can't locate much documentation on how to get this setup. I added several new environment vars and trilium shows the proper Login with PocketID button, but redirects to google instead of my server. Perhaps I'm using the wrong var names. It seems a misconfiguration issue. Seeking assistance to get this setup. Thank you.
I added and set accordingly:
Beta Was this translation helpful? Give feedback.
All reactions