Sign out not working with direct line speech adapters
See original GitHub issueVersion
4.11.0 CDN
Describe the bug
Our bot uses oauth cards to sign in and out our users. When we use just the direct line i.e:
<script>
(async function () {
const res = await fetch('@settings.TokenURL', { method: 'POST' });
const { token } = await res.json();
window.WebChat.renderWebChat(
{
directLine: window.WebChat.createDirectLine({ token })
},
document.getElementById('webchat')
);
document.querySelector('#webchat > *').focus();
})().catch(err => console.error(err));
</script>
… every thing is fine … but when we use direct line speech we get an error
<script>
(async function () {
const adapters = await window.WebChat.createDirectLineSpeechAdapters({
fetchCredentials: {
region: 'westus2',
subscriptionKey: '<Our Cognitive Service Speech Key>'
}
});
window.WebChat.renderWebChat(
{
...adapters
},
document.getElementById('webchat')
);
document.querySelector('#webchat > *').focus();
})().catch(err => console.error(err));
</script>
The error we get is as follows:
<img width="1917" alt="DirectLineSpeechError" src="https://user-images.githubusercontent.com/31521018/105133034-4ef89000-5ac2-11eb-910b-f323666b8530.png">
As you can see in addition to getting errors for : https://api.botframework.com/api/usertoken/GetToken?userId=<Guid>%7C0000&connectionName=BotOAuthConnection2&channelId=directlinespeech
We get errors for making this calls as well: https://api.botframework.com/api/usertoken/SignOut?userId=<Guid>%7C0000&connectionName=BotOAuthConnection2&channelId=directlinespeech
Steps to reproduce
- Create a bot with login and logout capabilities
- Implement direct line speech capability
- Try to logout
Expected behavior
We expect it the sign out behavior to be exactly the same as when we use just the direct line without the speech.
Additional context
Also with direct line speech we are get “Magic Numbers” when trying to login. We also use Azure AD2 B2C for login.
[Bug]
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
Chiming in here again – I have still not received any responses from the people I’ve reached out to, trying to confirm whether or not Direct Line Speech actually supports OAuthPrompt.
Additionally, without confirmation from the Speech side, this seems to be more of service issue with Direct Line Speech rather than an issue with Web Chat or the Bot Framework SDK, because ultimately if DLS doesn’t support OAuthPrompt, then it wouldn’t work in Web Chat or any other channel (like Teams) for example.
Update: also here’s a link to my personal repo, where I did investigating with DLS + another channel (not WC). As you can see, the other channels don’t seem to support OAuthPrompt with DLS (however they do with “normal” DL)
@Zerryth We have built the bot in C#.