Search code examples
botframeworkdirect-line-botframework

ResumptionCookie not in MS BotFramework v4


I am porting some code into the newer Microsoft Bot Framework V4 using C#.

The original code was a POC in v3 (still c# though).

I am trying to copy the authentication aspect whereby the user us redirected using a signin card to their bespoke (personal) login page external to the bot. Upon logging in there they are issued a refresh token via our external software, which is then sent via a POST request back to the a controller in the bot, which resumes the conversation (I think this is now referred to as direct line?).

This refresh token is then used to call our api and access data via dialogs.

The state of the conversation I can see is stored in a ResumptionCookie which seems to be part of the BotFramework v3. I understand the sequence but can't seem to locate a ResumptionCookie in v4, nor can I find any examples that I can match to this need.

I was wondering if any core concepts have changed with this regard, or simply the name of the cookie etc.

I'm very new to the framework which has made it slightly more confusing. Unfortunately it feels like the auth is the hardest and first part though!

Any help much appreciated!

Thanks


Solution

  • ResumptionCookie has been replaced with ConversationReference.

    Also, Azure Bot Service now provides an OAuth Service configurable from within the Bot Settings:

    enter image description here

    Using the Azure Bot Service OAuth with the OAuthPrompt, Bot Service will retrieve the token for you, and simplify the process of authenticating.

    More information can be found here: https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication

    A blog post announcing this feature can be found here: https://blog.botframework.com/2018/08/28/sign-in-experiences/