New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It doesn't support authorization code flow #14
Comments
I agree this should be added. For reference, here is a demo app using authorization code with the SDK. https://github.com/ringcentral/ringcentral-demos-oauth/tree/master/python-bottle |
In other SDKs, such as Java, C#...etc. We provide two methods to facilitate authorization code flow:
It is good if this SDK could provide these two methods. So users don't have to do everything from scratch. |
We have an escape latch for this: if you get the tokens you can set them directly via sdk.platform().auth().set_data(data) |
Providing better support for OAuth 2.0 Authorization Code flow is important because it is RingCentral's required OAuth flow for public apps and for all (public & private) Glip bots using the new bot provisioner (as requested in the OP). For websites, Authorization Code flow is a server-based flow designed for languages like Python, e.g. using Django. RingCentral also uses it for Glip bots now. As mentioned, this support is in RingCentral's other official SDKs, including JavaScript, C#, Java, etc. In JavaScript, the Authorization Code is designed for server-based apps such as Node.js / Express apps, similar to the Python / Django use case here. Here is a RingCentral tutorial for server-side JavaScript which uses the Auth Code support: https://github.com/ringcentral-tutorials/oauth-nodejs-demo Since it was mentioned in a side conversation, client-side JavaScript apps are meant to use Implicit Grant flow as per the OAuth 2.0 RFC: https://tools.ietf.org/html/rfc6749#section-1.3.2
Here is a RingCentral tutorial on using Implicit Grant: https://github.com/ringcentral-tutorials/oauth-implicit-js-demo In addition to the example Python / Bottle code I created and posted above using this SDK, built-in Python authorization code support similar to our other official SDKs is available in this community Python SDK for reference: |
Fixed in 0.7.8 |
Only password flow is supported.
https://devcommunity.ringcentral.com/ringcentraldev/topics/glip-bot-with-python
The text was updated successfully, but these errors were encountered: