Skip to content

Commit a5fee86

Browse files
committed
feat: basic auth guide
1 parent 6864310 commit a5fee86

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

docs/guides/advanced.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
# Advanced configs
1+
# Advanced Guides
2+
3+
## Authenticating to apps with basic auth
4+
5+
Some apps already offer some sort of authentication method like basic auth (the browser pop-up). This can be inconvenient because you may need to login both in Tinyauth and in the protected app. Tinyauth supports authenticating to apps for you. This can be done by adding the basic auth labels to your protected app:
6+
7+
```yaml
8+
tinyauth.basic.username: username
9+
tinyauth.basic.password.plain: password
10+
```
11+
12+
After you restart your app and login to Tinyauth you should be automatically logged in to the protected app using basic auth.
13+
14+
:::tip
15+
You can use the `tinyauth.basic.password.file` label instead of the plain one so as your password can remain safe in a secret file. Make sure to add the secret file as a volume to Tinyauth.
16+
:::
217

318
## Host network and Traefik
419

docs/reference/headers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Make sure to create a list of trusted proxy URLs that your app accepts headers f
4545
:::
4646

4747
:::info
48-
In order for the labels to work the container name needs to be the same as the exposed domain. For example, if your app is exposed at `app.example.com`, then the container name has to be `app` else Tinyauth won't be able to pick up the labels. This is a temporary issue and it will be fixed in a future update.
48+
By default Tinyauth will use the subdomain name of the request and it will try to find a container with a matching name in order to search for the labels. For example, if the request host is `myapp.example.com`, Tinyauth will check for labels in the container named `myapp`. You can change this behavior using the `tinyauth.domain` label. For more information check the [access controls](../guides/access-controls.md#label-discovery) guide.
4949
:::
5050

5151
## Adding headers to proxy

0 commit comments

Comments
 (0)