add flag to disable auth mode#83
Open
Tootam wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #74
ELI5: Optional Login Disable Mode
This branch adds a simple switch for people who run It's MyTabs behind their own login system, like Authentik, Authelia, NGINX auth, Cloudflare Access, or a private VPN.
What changed?
There is now a new environment variable:
When this is set to true, It's MyTabs does not ask users to log in.
The app assumes that something else in front of it is already protecting access.
Default behavior
By default, auth is still enabled:
MYTABS_DISABLE_AUTH=false
So existing installs keep working the same way as before.
What happens when auth is disabled?
When MYTABS_DISABLE_AUTH=true:
Important security note
Only disable auth if the app is protected another way.
Good examples:
Do not expose the app directly to the internet with auth disabled.
Docker usage
In compose.yaml, the default is:
environment:
MYTABS_DISABLE_AUTH: "false"
To disable auth, change it to:
environment:
MYTABS_DISABLE_AUTH: "true"
Then restart the container.
Running without Docker
If you run the app directly with Deno, set the environment variable before starting.
Linux/macOS
MYTABS_DISABLE_AUTH=true deno task start
Or export it first:
export MYTABS_DISABLE_AUTH=true
deno task start
Windows PowerShell
$env:MYTABS_DISABLE_AUTH="true"
deno task start
.env file
You can also add this to your .env file:
MYTABS_DISABLE_AUTH=true
Then start the app normally:
deno task start
Re-enabling built-in auth
Set the variable back to false or remove it:
MYTABS_DISABLE_AUTH=false
If no admin user exists yet, the app will ask you to create one again on startup.