mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-03-31 06:24:00 -04:00
Added Login with OIDC button to login page. Made login.ejs dynamic based on enabled authentication services. Made GitHub icon on login.ejs smaller. Refactored authorization.js middleware to support running both internal and OIDC authentication within the same instance. Added extra error to info.js when both authentication services are disabled but authentication itself is enabled. Updated status.js to correctly display both authentication services running at the same time. Updated README.md. Enabled /login when OIDC is enabled. Added missing middleware on /logout. Fixed JWT not initializing when authInternalEnabled is true
This commit is contained in:
@@ -72,7 +72,14 @@ module.exports = () => {
|
||||
/**
|
||||
* Log auth status
|
||||
*/
|
||||
log.info(`[Auth] ${variables.authDisabled ? 'Disabled!' : `Enabled! Type: ${variables.authOidcEnabled ? 'OIDC' : 'Internal'}`}`);
|
||||
log.info(`[Auth] ${variables.authDisabled ? 'Disabled!' : `Enabled! Type: ${variables.authInternalEnabled ? 'Internal' : ''}${variables.authInternalEnabled && variables.authOidcEnabled ? ', ' : ''}${variables.authOidcEnabled ? 'OIDC' : ''}`}`);
|
||||
|
||||
/**
|
||||
* Check auth services
|
||||
*/
|
||||
if(!variables.authDisabled && !variables.authInternalEnabled && !variables.authOidcEnabled) {
|
||||
log.error(`[Auth] Incorrect Configuration Detected!. Authentication is enabled but all authentication services have been disabled`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify OIDC configuration
|
||||
|
||||
Reference in New Issue
Block a user