Skip to content
Snippets Groups Projects
Commit 54e21ffc authored by Yogmatee Roochun's avatar Yogmatee Roochun
Browse files

timeout after logging

parent f6acf4cd
No related branches found
No related tags found
...@@ -237,16 +237,14 @@ class OrcidClaim extends React.Component { ...@@ -237,16 +237,14 @@ class OrcidClaim extends React.Component {
thorApplicationNamespace.addWork() thorApplicationNamespace.addWork()
} }
loginToOrcid = () => { loginToOrcid = async () => {
thorApplicationNamespace.notifyClientApp( thorApplicationNamespace.notifyClientApp(
thorApplicationNamespace.notify.loginClick, thorApplicationNamespace.notify.loginClick,
) )
await new Promise(done => setTimeout(() => console.log("after notifyClientApp..."), 300000))
const url = thorApplicationNamespace.getLoginUrl() const url = thorApplicationNamespace.getLoginUrl()
window.open(url, 'ORCID') window.open(url, 'ORCID')
window.setTimeout( await new Promise(done => setTimeout(() => console.log("after getLoginUrl..."), 300000))
() => console.log("Timeout for loginToOrcid"),
300000,
)
} }
logoutFromOrcid = () => { logoutFromOrcid = () => {
...@@ -291,9 +289,9 @@ class OrcidClaim extends React.Component { ...@@ -291,9 +289,9 @@ class OrcidClaim extends React.Component {
return ( return (
<ShowComponent <ShowComponent
isLoading={this.state.isLoading} isLoading={this.state.isLoading}
onClick={() => { onClick={async () => {
try { try {
this.loginToOrcid() await this.loginToOrcid()
} catch (e) { } catch (e) {
this.callErrorCallbackIfRequired(false, e) this.callErrorCallbackIfRequired(false, e)
throw e throw e
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment