tachyons / botframework-ruby

Microsoft Bot Framework ruby client
MIT License
39 stars 16 forks source link

OAuth2 - Invalid client #11

Closed Grandvizir closed 7 years ago

Grandvizir commented 7 years ago

Hello,

I am using your gem to connect to the Microsoft Bot Framework v3. Did you start to code for this third version of MBF ? When I receive a POST from MBF I get an exception from OAuth2 - invalid_client. client_assertion or client_secret is required for the client_credentials grant type

I have check that my app_id and app_secret are valid pair keys. Any idea ?

Cheers;

tachyons commented 7 years ago

Are using the gem from rubygems.org or the version in master?. Microsoft recently changed their oauth mechanism for botframework. BTW do not use this gem in production, this is still under development.

Also feel free to contribute if you are interested ;-)

Grandvizir commented 7 years ago

I am using the gem from the version in master. I cloned it and ran (i had to change your lib/ link as i run example in the ruby_conf folder): $(examples/ruby_conf/)> rackup config.ru

I just changed the TokenValidator.valid_iss? condition to verify https://api.botframework.com instead of your stuff. Same for valid_audience? which need to check my app-id.

Are you still able to run your code and play with your bot ? Also, how are your running your examples.

Thanks for your reply, I will contribute as soon as I am ready to understand what have been done and how. I already had a look to the C# BF and Azure, but I would prefer to use it with ruby <3

tachyons commented 7 years ago

Thanks for the explanation, all examples where working when I tried last time. I'll check this tomorrow A bot basically a rack app, so you can use the command rackup to run the bot

Codebase is mostly port of the nodejs version of bot builder.

tachyons commented 7 years ago

Sorry for the delay. I had to run bundle update to get that example working. ISS issue is because Microsoft updated their ISS link in botframework 3.1 https://docs.botframework.com/en-us/restapi/authentication/#navtitle . I am not sure about how to handle both versions of botframework api in this client library

tachyons commented 7 years ago

@Grandvizir Can you please check this again, this must have fixed in #16