docs: update email regex examples (#2749)
The previous examples lacked start and end anchors
This commit is contained in:
+2
-2
@@ -34,9 +34,9 @@ DEPLOY_REGISTRY_HOST=localhost:5000
|
||||
|
||||
# OPTIONAL VARIABLES
|
||||
# This is used for validating emails that are allowed to log in. Every email that do not match this regex will be rejected.
|
||||
# WHITELISTED_EMAILS="authorized@yahoo\.com|authorized@gmail\.com"
|
||||
# WHITELISTED_EMAILS="^(authorized@yahoo\.com|authorized@gmail\.com)$"
|
||||
# Accounts with these emails will get global admin rights. This grants access to the admin UI.
|
||||
# ADMIN_EMAILS="admin@example\.com|another-admin@example\.com"
|
||||
# ADMIN_EMAILS="^(admin@example\.com|another-admin@example\.com)$"
|
||||
# This is used for logging in via GitHub. You can leave these commented out if you don't want to use GitHub for authentication.
|
||||
# AUTH_GITHUB_CLIENT_ID=
|
||||
# AUTH_GITHUB_CLIENT_SECRET=
|
||||
|
||||
@@ -313,7 +313,7 @@ All email addresses can sign up and log in this way. If you would like to restri
|
||||
|
||||
```bash
|
||||
# every email that does not match this regex will be rejected
|
||||
WHITELISTED_EMAILS="authorized@yahoo\.com|authorized@gmail\.com"
|
||||
WHITELISTED_EMAILS="^(authorized@yahoo\.com|authorized@gmail\.com)$"
|
||||
```
|
||||
|
||||
It's currently impossible to restrict GitHub OAuth logins by account name or email like above, so this method is _not recommended_ for self-hosted instances. It's also very easy to lock yourself out of your own instance.
|
||||
|
||||
@@ -299,7 +299,7 @@ All email addresses can sign up and log in this way. If you would like to restri
|
||||
|
||||
```bash
|
||||
# every email that does not match this regex will be rejected
|
||||
WHITELISTED_EMAILS="authorized@yahoo\.com|authorized@gmail\.com"
|
||||
WHITELISTED_EMAILS="^(authorized@yahoo\.com|authorized@gmail\.com)$"
|
||||
```
|
||||
|
||||
This will apply to all auth methods including magic link and GitHub OAuth.
|
||||
|
||||
@@ -476,7 +476,7 @@ webapp:
|
||||
webapp:
|
||||
extraEnvVars:
|
||||
- name: WHITELISTED_EMAILS
|
||||
value: "user1@company\\.com|user2@company\\.com"
|
||||
value: "^(user1@company\\.com|user2@company\\.com)$"
|
||||
```
|
||||
|
||||
## Version locking
|
||||
|
||||
Reference in New Issue
Block a user