databricks / databricks-sdk-py

Databricks SDK for Python (Beta)
https://databricks-sdk-py.readthedocs.io/
Apache License 2.0
318 stars 103 forks source link

Added retry logic to token refresh to deal with #672

Open thijs-nijhuis opened 1 month ago

thijs-nijhuis commented 1 month ago

Changes

The logic that fetches an initial access_token has a fall back/retry path for SPA applications which need an 'origin' header. For the part that fetches a refresh token, this fall back was not there. Instead, an 'origin' would always be set for Azure endpoints but this causes issues with application that use the 'Mobile and desktop applications' platform authentication which will throw an error if an 'origin' header is set. This change should fix this issue by tackling both paths in the same way.

Tests

sertacosh commented 6 days ago

We need this change implemented!