singingwolfboy / flask-dance

Doing the OAuth dance with style using Flask, requests, and oauthlib.
https://pypi.python.org/pypi/Flask-Dance/
MIT License
1.01k stars 158 forks source link

Added domain option to Salesforce blueprint #346

Closed Przemoo16 closed 3 years ago

Przemoo16 commented 3 years ago

Right now Salesforce will be working only with the production instance. That change adds the possibility to specify custom domains in the Salesforce blueprint.

Also changed base URL in the blueprint. It will make easier to use the session in further requests.

codecov[bot] commented 3 years ago

Codecov Report

Merging #346 (6ec9b40) into main (5a17754) will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #346      +/-   ##
==========================================
+ Coverage   93.80%   93.82%   +0.01%     
==========================================
  Files          33       33              
  Lines        1066     1068       +2     
==========================================
+ Hits         1000     1002       +2     
  Misses         66       66              
Impacted Files Coverage Δ
flask_dance/contrib/salesforce.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5a17754...6ec9b40. Read the comment docs.

Przemoo16 commented 3 years ago

Another approach which gives the user better understanding parameters and more flexibility: https://github.com/singingwolfboy/flask-dance/pull/346/commits/db8ad30fefcb61bb6cc7370d30a98d9ac3b807cf

But still the question about base_url. Should we leave it empty if user doesn't define hostname?

Przemoo16 commented 3 years ago

Yes hostname will always be defined. I squashed the commits and now it is ready to merge.