Lots of fixes towards making Oauth2 smooth
This commit is contained in:
@@ -15,7 +15,7 @@ const alertStyle = {
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
boxShadow: '0px 2px 2px 2px rgba(0, 0, 0, 0.03)',
|
||||
width: 400,
|
||||
width: 300,
|
||||
boxSizing: 'border-box',
|
||||
zIndex: 100001,
|
||||
overflow: "hidden",
|
||||
|
||||
@@ -57,27 +57,32 @@ const AuthenticationOauth2 = (props) => {
|
||||
try {
|
||||
|
||||
var newwin = window.open(url, "", "width=400,height=200")
|
||||
console.log(newwin)
|
||||
setTimeout(() => {
|
||||
console.log(newwin)
|
||||
console.log("CLOSED", newwin.closed)
|
||||
}, 1000)
|
||||
//console.log(newwin)
|
||||
|
||||
var open = true
|
||||
const timer = setInterval(() => {
|
||||
if (newwin.closed) {
|
||||
clearInterval(timer);
|
||||
//alert('"Secure Payment" window closed!');
|
||||
|
||||
setTimeout(() => {
|
||||
console.log(newwin)
|
||||
console.log("CLOSED", newwin.closed)
|
||||
if (newwin.closed) {
|
||||
getAppAuthentication(true, true)
|
||||
setTimeout(() => {
|
||||
console.log("APPAUTH: ", appAuthentication)
|
||||
|
||||
//{selectedAction.authentication.map(data => {
|
||||
|
||||
setAuthenticationModalOpen(false)
|
||||
saveWorkflow(workflow)
|
||||
}, 1500)
|
||||
}
|
||||
}, 10000)
|
||||
}
|
||||
}, 1000);
|
||||
//do {
|
||||
// setTimeout(() => {
|
||||
// console.log(newwin)
|
||||
// console.log("CLOSED", newwin.closed)
|
||||
// if (newwin.closed) {
|
||||
|
||||
// open = false
|
||||
// }
|
||||
// }, 1000)
|
||||
//}
|
||||
//while(open === true)
|
||||
} catch (e) {
|
||||
alert.error("Failed authentication - probably bad credentials. Try again")
|
||||
setButtonClicked(false)
|
||||
|
||||
@@ -1397,7 +1397,7 @@ const ParsedAction = (props) => {
|
||||
<Tooltip color="primary" title={"Add authentication option"} placement="top">
|
||||
<span>
|
||||
<Button color="primary" style={{}} fullWidth variant="contained" onClick={() => {
|
||||
console.log(authenticationType)
|
||||
//console.log(authenticationType)
|
||||
|
||||
setAuthenticationModalOpen(true)
|
||||
}}>
|
||||
|
||||
Reference in New Issue
Block a user