tzmfreedom / rustforce

Salesforce REST API Client by Rust
MIT License
41 stars 19 forks source link

Different OAuth2 Flows #21

Open abusarah-tech opened 2 years ago

abusarah-tech commented 2 years ago

I have been recently thinking of implementing a similar abstraction to jsforce.OAuth2 where the client is provided with CLIENT_ID, CLIENT_SECRET and from there we can generate an authorization url that can be used as a redirection point.

Also the handling of response_type=code can be done by providing the returned code from a request of an HTTP server to something like client.authorize(code).await? from there the rustforce::Client will be functional in the way it works right now.

I am working on the PR but if there any suggestions, let me know.

ogomezba commented 1 year ago

Hi AbuHafsa!

I was also thinking about implementing something like this. However, I think that processing the code in a server is not possible because the code is included as a Hash Fragment in the return URL. But maybe it can work in some other way.