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.
I have been recently thinking of implementing a similar abstraction to
jsforce.OAuth2where the client is provided withCLIENT_ID,CLIENT_SECRETand from there we can generate an authorization url that can be used as a redirection point.Also the handling of
response_type=codecan be done by providing the returned code from a request of an HTTP server to something likeclient.authorize(code).await?from there therustforce::Clientwill be functional in the way it works right now.I am working on the PR but if there any suggestions, let me know.