Conditional useEffect in oauth2 mapper fixed
This commit is contained in:
@@ -128,6 +128,13 @@ const AuthenticationOauth2 = (props) => {
|
|||||||
active: true,
|
active: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log("Should automatically click the auto-auth button?")
|
||||||
|
if (autoAuth === true && selectedApp !== undefined) {
|
||||||
|
startOauth2Request()
|
||||||
|
}
|
||||||
|
}, [])
|
||||||
|
|
||||||
if (selectedApp.authentication === undefined) {
|
if (selectedApp.authentication === undefined) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -216,12 +223,6 @@ const AuthenticationOauth2 = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log("Should automatically click the auto-auth button?")
|
|
||||||
if (autoAuth === true && selectedApp !== undefined) {
|
|
||||||
startOauth2Request()
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
const handleOauth2Request = (client_id, client_secret, oauth_url, scopes, admin_consent) => {
|
const handleOauth2Request = (client_id, client_secret, oauth_url, scopes, admin_consent) => {
|
||||||
setButtonClicked(true);
|
setButtonClicked(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user