microsoft / BotFramework-Services

Microsoft Bot Framework Services
Creative Commons Attribution 4.0 International
38 stars 11 forks source link

Generic Oauth 2.0 in Oauth Connection Setting in Azure for Bot User Authentication #336

Closed inb18 closed 2 years ago

inb18 commented 2 years ago

Hi, I am working on bot that and implementing user authentication , I did oauth connection setting with generic oauth 2.0 but i get this error while I test connection on url:-https://token.botframework.com/.auth/web/redirect?code=zNEUkT&state=82e83c4f6bd7425c929f9c6b0fe140fe { "error": { "code": "ServiceError", "message": "Missing session cookie (consent82e83c4f6bd7425c929f9c6b0fe140fe) in consent redirect request." } }

xieofxie commented 2 years ago

@inb18 We need session cookie to verify the login.

If you copy this url https://token.botframework.com/.auth/web/redirect?XXX to another browser, it will not work. You should copy one like this https://token.botframework.com/api/oauth/signin?signin= before the redirect

inb18 commented 2 years ago

Hello, Actually I am configuring Oauth Connection Setting using Generic Oauth 2.0 for my domain , I provided login url in Authorization Url after succesfull authentication my domain url return code and state to the redirected url. And redirect url is https://token.botframework.com/.auth/web/redirect as per this documentation https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=userassigned%2Caadv2%2Ccsharp

Danieladu commented 2 years ago

hi @inb18 , could you provide the botid so that we can check the log to see what happens. Thanks. image

xieofxie commented 2 years ago

What oauth provider do you use?

An example for AAD here https://docs.microsoft.com/en-us/power-virtual-agents/configuration-end-user-authentication#manual-authentication-fields

bobokids commented 2 years ago

@inb18, do you have the info xieofxie mentioned above?

luhan2017 commented 2 years ago

@inb18 , we didn't see your response for a long time, do you still see the error?

luhan2017 commented 2 years ago

@inb18 , I am closing this since it is inactive for a long time, please reactive it if it is still needed