Disable google auth if no config found (#9983)
* Fix for #9937 - Google config was pre-activated always, even if no google config had been created. * Fixing test case.
This commit is contained in:
parent
90c20206b3
commit
51c63d7258
|
@ -287,7 +287,7 @@ export async function publicSettings(
|
||||||
|
|
||||||
// google
|
// google
|
||||||
const googleConfig = await configs.getGoogleConfig()
|
const googleConfig = await configs.getGoogleConfig()
|
||||||
const preActivated = googleConfig?.activated == null
|
const preActivated = googleConfig && googleConfig.activated == null
|
||||||
const google = preActivated || !!googleConfig?.activated
|
const google = preActivated || !!googleConfig?.activated
|
||||||
const _googleCallbackUrl = await googleCallbackUrl(googleConfig)
|
const _googleCallbackUrl = await googleCallbackUrl(googleConfig)
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ describe("configs", () => {
|
||||||
company: "Budibase",
|
company: "Budibase",
|
||||||
logoUrl: "",
|
logoUrl: "",
|
||||||
analyticsEnabled: false,
|
analyticsEnabled: false,
|
||||||
google: true,
|
google: false,
|
||||||
googleCallbackUrl: `http://localhost:10000/api/global/auth/${config.tenantId}/google/callback`,
|
googleCallbackUrl: `http://localhost:10000/api/global/auth/${config.tenantId}/google/callback`,
|
||||||
isSSOEnforced: false,
|
isSSOEnforced: false,
|
||||||
oidc: false,
|
oidc: false,
|
||||||
|
|
Loading…
Reference in New Issue