Skip to content

Commit 50e12b0

Browse files
committed
fix
1 parent cc7c236 commit 50e12b0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

NEXT_CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### Bug Fixes
88

9+
* Ensure that refresh tokens are returned when using the `external-browser` credentials strategy.
10+
911
### Documentation
1012

1113
### Internal Changes

databricks/sdk/oauth.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,11 @@ def __init__(
629629
):
630630

631631
if not scopes:
632-
scopes = ["all-apis"]
632+
# all-apis ensures that the returned OAuth token can be used with all APIs, aside
633+
# from direct-to-dataplane APIs.
634+
# offline_access ensures that the response from the Authorization server includes
635+
# a refresh token.
636+
scopes = ["all-apis", "offline_access"]
633637

634638
self.redirect_url = redirect_url
635639
self._client_id = client_id

0 commit comments

Comments
 (0)