Virtual Assistant and Skill
TypeScript
When using authentication in the Teams channel the token comes back on a "onInvokeActivity" method instead of the "onTeamsSigninVeryfyState". This causes a problem when trying to upgrade to the bot-solutions base 1.0.0 since the veryfyState method does not receive the token to forward to the skill. When trying to use the InvokeActivity we receive a type error as the return type is not compatible.
Clone the VA base 1.0.0 branch, attach skill with authentication and run dialog through the Teams channel.
Try adding the "onInvokeActivity" to the VA to pass the token through on the Teams channel
The ability to receive the token back on the "onTeamsSigninVerifyState" method
Argument of type 'DefaultActivityHandler
The types returned by 'onInvokeActivity(...)' are incompatible between these types.
Type "Promise\
Hi @tomSauret847, thanks for reporting this issue. We came up with some questions to narrow the issue:
onTeamsSignInVerifyState to handleTeamsSignInVerifyState following the SDK implementation and the sample of BotBuillder-Samples repository that contains AuthenticationAs soon as we have any update for you, we will back to this issue 馃槉.
Thank you @Batta32 We are using the #3583 and the #3584 pull requests in the implementation. I am sorry I had the wrong method listed above but we are using the handleTeamsSigninVerifyState method in the VA. When adding logging inside the method it is not being used when the token is returned. For the skill we are using #3583 PR for the bot-solutions package and #3585 for the base. I did have to make a change when setting up the MultiProviderAuthDialog to account for a locale that is not in the bot framework. Here is the modification I made,
const promptSettings = [{
connectionName: settings.authenticationConnections[0].name,
text: 'Please sign in for verification.',
title: 'Click to signin',
timeout: 300000
}];
const promptSettingsId = [{
connectionName: settings.authenticationConnections[0].name,
text: 'Mohon sign in untuk verifikasi.',
title: 'Klik untuk sign in',
timeout: 300000
}];
const authPromptId = new MultiProviderAuthDialog(settings.authenticationConnections,'id-id', promptSettingsId);
const authPrompt = new MultiProviderAuthDialog(settings.authenticationConnections, 'en-us', promptSettings);
Let me know if you need anymore information.
Hi @tomSauret847 we successfully reproduced the issue, following the repro steps that you described.
We recently pushed some changes in the PR #3583 in order to send the token to the TokenProvider as C# does. Please, pull the changes to incorporate them in your bots.
We will continue working on find a solution, we will let you know the updates 馃槉
_Issue reproduced_

Hi聽@tomSauret847, we found a solution for the issue.
Follow these steps:
Verify each commit of the branch:
Let us know if this helps you 馃槉.
_Authentication successfully working in MS Teams channel using 1.0 TypeScript bots_

@Batta32 Thank you for fixing this. I have implemented the changes you provided and can confirm the token is being passed through to the skill as expected. Thank you for a timely fix for this issue!
Most helpful comment
@Batta32 Thank you for fixing this. I have implemented the changes you provided and can confirm the token is being passed through to the skill as expected. Thank you for a timely fix for this issue!