Skip to content

Commit 4c8469c

Browse files
Remove parameters to ee.Authenticate() to get the default Colab authentication experience (#2033)
* Remove parameters to ee.Authenticate to get default Colab experience * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Sufyan Abbasi <sufy@google.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e27e3f1 commit 4c8469c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

geemap/common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def ee_initialize(
7474
if in_colab_shell():
7575
from google.colab import userdata
7676

77-
auth_args["auth_mode"] = "colab"
7877
if project is None:
7978
try:
8079
project = userdata.get("EE_PROJECT_ID")
@@ -83,7 +82,9 @@ def ee_initialize(
8382
raise Exception(
8483
"Please set a secret named 'EE_PROJECT_ID' in Colab or provide a project ID."
8584
)
86-
ee.Authenticate(**auth_args)
85+
# Authentication will automatically detect the Colab environment,
86+
# no additional params needed.
87+
ee.Authenticate()
8788
ee.Initialize(**kwargs)
8889
return
8990
else:

0 commit comments

Comments
 (0)