graphistry / pygraphistry

PyGraphistry is a Python library to quickly load, shape, embed, and explore big graphs with the GPU-accelerated Graphistry visual graph analyzer
BSD 3-Clause "New" or "Revised" License
2.14k stars 204 forks source link

Attempt to fix refresh() for SSO #555

Closed vaimdev closed 6 months ago

vaimdev commented 6 months ago

Refresh in SSO will not display the auth_url due to condition error. This PR enhance the existing code to throw Token Expire exception and print the correct print out to tell the user that token is expired and required to relogin via SSO.

lmeyerov commented 6 months ago

AFAICT this mostly just changes the exn to being structured, and gives a clearer exn

vaimdev commented 6 months ago

AFAICT this mostly just changes the exn to being structured, and gives a clearer exn

I remembered the changes in the PR that fix the bug, this part of code, in the if condition, I removed the and not Pygraphistry.api_token() , which will print the login URL in the case of refresh. Previously, refresh won't enter the if block because Pygraphistry.api_token() contains old api_token value.

image