|
|
@@ -21,6 +21,7 @@ export default class AdminGoogleSecurityContainer extends Container {
|
|
|
|
|
|
this.state = {
|
|
|
callbackUrl: urljoin(pathUtils.removeTrailingSlash(appContainer.config.crowi.url), '/passport/google/callback'),
|
|
|
+ isGoogleStrategySetup: false,
|
|
|
googleClientId: '',
|
|
|
googleClientSecret: '',
|
|
|
isSameUsernameTreatedAsIdenticalUser: false,
|
|
|
@@ -36,6 +37,7 @@ export default class AdminGoogleSecurityContainer extends Container {
|
|
|
const response = await this.appContainer.apiv3.get('/security-setting/');
|
|
|
const { googleOAuth } = response.data.securityParams;
|
|
|
this.setState({
|
|
|
+ isGoogleStrategySetup: googleOAuth.isGoogleStrategySetup,
|
|
|
googleClientId: googleOAuth.googleClientId || '',
|
|
|
googleClientSecret: googleOAuth.googleClientSecret || '',
|
|
|
isSameUsernameTreatedAsIdenticalUser: googleOAuth.isSameUsernameTreatedAsIdenticalUser || false,
|
|
|
@@ -84,6 +86,7 @@ export default class AdminGoogleSecurityContainer extends Container {
|
|
|
const { securitySettingParams } = response.data;
|
|
|
|
|
|
this.setState({
|
|
|
+ isGoogleStrategySetup: securitySettingParams.isGoogleStrategySetup,
|
|
|
googleClientId: securitySettingParams.googleClientId,
|
|
|
googleClientSecret: securitySettingParams.googleClientSecret,
|
|
|
isSameUsernameTreatedAsIdenticalUser: securitySettingParams.isSameUsernameTreatedAsIdenticalUser,
|