mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
Allow users to define the LOGIN_URL.
If you rely on a single SSO provider, it can be confusing for users to see the username/password login with the SSO provider below. By allowing the LOGIN_URL to be overwritten users can be redirect directly to the SSO provider.
This commit is contained in:
parent
d131d9b310
commit
3e13b8b4c4
@ -455,8 +455,11 @@ MESSAGE_TAGS = {
|
||||
messages.ERROR: 'danger',
|
||||
}
|
||||
|
||||
# Authentication URLs
|
||||
LOGIN_URL = f'/{BASE_PATH}login/'
|
||||
# Authentication URLs, if the LOGIN_URL have not been defined in the configuration, default to '/{BASE_PATH}login/'
|
||||
# Typical usecase for defining the LOGIN_URL will be to redirect to a SSO provider.
|
||||
if 'LOGIN_URL' not in vars():
|
||||
LOGIN_URL = f'/{BASE_PATH}login/'
|
||||
|
||||
LOGIN_REDIRECT_URL = f'/{BASE_PATH}'
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
Loading…
Reference in New Issue
Block a user