Skip to content

Commit 2b8914c

Browse files
committed
Fix #443 ensure that device code url opens in new tab/window
1 parent 0f17b5a commit 2b8914c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121

2222
- Fix format option conflict between `save_result` and `create_job`
2323
[#433](https://github.com/Open-EO/openeo-python-client/issues/433)
24+
- Ensure that OIDC device code link opens in a new tab/window [#443](https://github.com/Open-EO/openeo-python-client/issues/443)
2425

2526

2627
## [0.18.0] - 2023-05-31

openeo/rest/auth/oidc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,9 @@ def __init__(
732732

733733
def _instructions(self, info: VerificationInfo) -> str:
734734
url = info.verification_uri_complete if info.verification_uri_complete else info.verification_uri
735-
instructions = f'Visit <a href="{url}" title="Authenticate at {url}">{url}</a>'
735+
instructions = (
736+
f'Visit <a href="{url}" title="Authenticate at {url}" target="_blank" rel="noopener noreferrer">{url}</a>'
737+
)
736738
instructions += f' <a href="#" onclick="navigator.clipboard.writeText({url!r});return false;" title="Copy authentication URL to clipboard">&#128203;</a>'
737739
if not info.verification_uri_complete:
738740
instructions += f" and enter user code {info.user_code!r}"

0 commit comments

Comments
 (0)