Skip to content

Commit f00a57b

Browse files
authored
Merge branch 'master' into jules-task-queue-cred-fix
2 parents cee4759 + de713d2 commit f00a57b

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

firebase_admin/_auth_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def _parse_error_body(response):
479479
separator = code.find(':')
480480
if separator != -1:
481481
custom_message = code[separator + 1:].strip()
482-
code = code[:separator]
482+
code = code[:separator].strip()
483483

484484
return code, custom_message
485485

integration/test_auth.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,19 @@ def test_email_sign_in_with_settings(new_user_email_unverified, api_key):
724724
assert id_token is not None and len(id_token) > 0
725725
assert auth.get_user(new_user_email_unverified.uid).email_verified
726726

727+
def test_auth_error_parse(new_user_email_unverified):
728+
action_code_settings = auth.ActionCodeSettings(
729+
ACTION_LINK_CONTINUE_URL, handle_code_in_app=True, link_domain="cool.link")
730+
with pytest.raises(auth.InvalidHostingLinkDomainError) as excinfo:
731+
auth.generate_sign_in_with_email_link(new_user_email_unverified.email,
732+
action_code_settings=action_code_settings)
733+
assert str(excinfo.value) == ('The provided hosting link domain is not configured in Firebase '
734+
'Hosting or is not owned by the current project '
735+
'(INVALID_HOSTING_LINK_DOMAIN). The provided hosting link '
736+
'domain is not configured in Firebase Hosting or is not owned '
737+
'by the current project. This cannot be a default hosting domain '
738+
'(web.app or firebaseapp.com).')
739+
727740

728741
@pytest.fixture(scope='module')
729742
def oidc_provider():

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[tool:pytest]
22
testpaths = tests
33
asyncio_default_test_loop_scope = class
4-
asyncio_default_fixture_loop_scope = None

0 commit comments

Comments
 (0)