I am trying to build a client side app using javascript
. I have the client id for the domain 'circuit.siemens.com'
. Redirect_uri
is set to the localhost:(port no.)
.
When the script hits client.Logon()
it opens up a web page for logging in. Once the login is done it again redirects to the same login page. It never goes past after the login is successful.
What is the issue and how do I solve it?
I have posted my code below for further reference.
debugger;
let client = new Circuit.Client({
client_id:'provided id',
scope: 'ALL',
domain: 'circuit.siemens.com',
//redirect_uri: 'localhost:*****'
});
client.logon()
.then(user => console.log(`Logged on as ${user.displayName}`, user))
.then(() => client.getUsersByEmail(['participant email', 'participant email']))
.then(users => users.map(user => user.userId))
.then(userIds => client.createGroupConversation(userIds, 'runkit example'))
.then(conv => client.addTextItem(conv.convId, 'Hi. What can I do for you?'))
.then(client.logout)
.catch(console.error)
});
});
</script>