fair-research / native-login

Provides Native App login and token storage for multiple providers
Apache License 2.0
3 stars 2 forks source link

Added more examples for edge cases #43

Closed NickolausDS closed 5 years ago

NickolausDS commented 5 years ago

@rpwagner Not sure how useful these new docs are, so I could use a different perspective. The basic usage now shows loading tokens by scope. The new file, handling_edge_cases.py shows some additional common error checking developers can do for more refined tools.

NickolausDS commented 5 years ago

@rpwagner For automate I know getting tokens by scope was preferable. I'm not sure if it was a requirement, but it would save some trouble of reorganizing tokens when they're needed. Fetching tokens by scope was added in #41 and was nice to have generally since it's also available in the Globus SDK.

The more likely roadblock for automate was likely #33, which caused loading tokens to break if other unrelated tokens expired (load_tokens() would raise an exception if any token expired). Since automate arbitrarily requests new scopes and loads only specific scopes when they're needed, #33 caused problems if one less used scope expired.

Thanks for looking this one over!