Add ability to prevent OIDC redirect (#6544)
* Add ability to prevent OIDC redirect * Fix Typing on optional boolean * Fix lint * Fix lint * Rename var from PREVENT to DISABLE --------- Co-authored-by: Tom Moor <tom@getoutline.com>
This commit is contained in:
@@ -229,7 +229,11 @@ function Login({ children }: Props) {
|
||||
}
|
||||
|
||||
// If there is only one provider and it's OIDC, redirect immediately.
|
||||
if (config.providers.length === 1 && config.providers[0].id === "oidc") {
|
||||
if (
|
||||
config.providers.length === 1 &&
|
||||
config.providers[0].id === "oidc" &&
|
||||
!env.OIDC_DISABLE_REDIRECT
|
||||
) {
|
||||
window.location.href = getRedirectUrl(config.providers[0].authUrl);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user