René's URL Explorer Experiment


Title: Illegal Firebase credential provided. App must be initialized with a valid credential instance error - when using another type of `google.auth.Credential` object with the SDK. · Issue #698 · firebase/firebase-admin-python · GitHub

Open Graph Title: Illegal Firebase credential provided. App must be initialized with a valid credential instance error - when using another type of `google.auth.Credential` object with the SDK. · Issue #698 · firebase/firebase-admin-python

X Title: Illegal Firebase credential provided. App must be initialized with a valid credential instance error - when using another type of `google.auth.Credential` object with the SDK. · Issue #698 · firebase/firebase-admin-python

Description: Hi there, I am having some issues using the firebase_admin python client with a credential object from outside the SDK. In my use case, I want to initialize the firebase_admin SDK using a Service Account impersonation credential to list ...

Open Graph Description: Hi there, I am having some issues using the firebase_admin python client with a credential object from outside the SDK. In my use case, I want to initialize the firebase_admin SDK using a Service A...

X Description: Hi there, I am having some issues using the firebase_admin python client with a credential object from outside the SDK. In my use case, I want to initialize the firebase_admin SDK using a Service A...

Opengraph URL: https://github.com/firebase/firebase-admin-python/issues/698

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Illegal Firebase credential provided. App must be initialized with a valid credential instance error - when using another type of `google.auth.Credential` object with the SDK.","articleBody":"Hi there, I am having some issues using the `firebase_admin` python client with a credential object from outside the SDK.\r\n\r\nIn my use case, I want to initialize the `firebase_admin` SDK using a Service Account impersonation credential to list users within the firebase environment.\r\n\r\nTo do this I tried the following:\r\n\r\n```python\r\nimport google.oauth2.credentials\r\nimport google.auth.impersonated_credentials\r\n\r\nsource_credentials = google.oauth2.credentials.Credentials(token=id_token)\r\ncredentials = google.auth.impersonated_credentials.Credentials(\r\n    source_credentials=source_credentials,\r\n    target_principal=my_service_account_email,\r\n    target_scopes=target_scopes,\r\n    lifetime=500\r\n)\r\n\r\napp_options = {'projectId': project_id}\r\nfirebase_app = firebase_admin.initialize_app(\r\n  credential=firebase_credential, options=app_options)\r\n```\r\n\r\nWhen running `initialize_app` it returns an exception - `Illegal Firebase credential provided. App must be initialized with a valid credential instance`.\r\n\r\nLooking into the `firebase-admin-python` source code I was able to find the source of the problem. In `firebase_admin/__init__.py` line 209 the code checks whether the supplied `credentials` object is an instance of `firebase_admin.credentials.Base`. If not, then the SDK returns the exception.\r\n\r\nI don't understand why this is the case. Why does `firebase-admin-python` have its own credentials class which seems to just wrap `google.oauth2.credentials` objects? Why wouldn't the Firebase SDK accept a `google.oauth2.credentials` object directly?\r\n\r\nI was able to work around it by hacking the `ApplicationDefault` class that comes with the `firebase-admin-python` SDK, however this seems a bit backwards.\r\n\r\n```python\r\nfirebase_credential = firebase_admin.credentials.ApplicationDefault()\r\nfirebase_credential._g_credential = credentials\r\nfirebase_credential._project_id = SOURCE_PROJECT\r\n```\r\n\r\nIn my opinion it would be better if the firebase SDK just made use of the `google.auth` module which has a much better implementation.\r\n","author":{"url":"https://github.com/LPLabrys99","@type":"Person","name":"LPLabrys99"},"datePublished":"2023-05-04T15:35:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/698/firebase-admin-python/issues/698"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:590c289d-2bef-bc9e-6049-752041c6bd97
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDE28:8F603:94DC8B:CBF276:698F3447
html-safe-nonce939c37377a0a5f6c674a9675b630bf79ee93b65a18010fccae2803e5cfb13c63
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTI4OjhGNjAzOjk0REM4QjpDQkYyNzY6Njk4RjM0NDciLCJ2aXNpdG9yX2lkIjoiNjcxNDY1ODg2OTExNTU2NTEyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9088a404ef3dd802d12a2af02fa5b1de84b81e5336d764ec5a057028356aee88
hovercard-subject-tagissue:1696257852
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/firebase/firebase-admin-python/698/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c6b9f86d1f3654a78c6541b1b96fb13c989fdd6e46ce2c6a3ae48cfaf92997ea/firebase/firebase-admin-python/issues/698
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c6b9f86d1f3654a78c6541b1b96fb13c989fdd6e46ce2c6a3ae48cfaf92997ea/firebase/firebase-admin-python/issues/698
og:image:altHi there, I am having some issues using the firebase_admin python client with a credential object from outside the SDK. In my use case, I want to initialize the firebase_admin SDK using a Service A...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLPLabrys99
hostnamegithub.com
expected-hostnamegithub.com
None6102991c714c1a6a27d05fb4f96ea6ca87a6750b4f093b95cc57ed1b84b145a1
turbo-cache-controlno-preview
go-importgithub.com/firebase/firebase-admin-python git https://github.com/firebase/firebase-admin-python.git
octolytics-dimension-user_id1335026
octolytics-dimension-user_loginfirebase
octolytics-dimension-repository_id84979152
octolytics-dimension-repository_nwofirebase/firebase-admin-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id84979152
octolytics-dimension-repository_network_root_nwofirebase/firebase-admin-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee2fe82f90e107669021e243add8f74ea2a9be1b3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/firebase/firebase-admin-python/issues/698#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffirebase%2Ffirebase-admin-python%2Fissues%2F698
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffirebase%2Ffirebase-admin-python%2Fissues%2F698
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=firebase%2Ffirebase-admin-python
Reloadhttps://github.com/firebase/firebase-admin-python/issues/698
Reloadhttps://github.com/firebase/firebase-admin-python/issues/698
Reloadhttps://github.com/firebase/firebase-admin-python/issues/698
firebase https://github.com/firebase
firebase-admin-pythonhttps://github.com/firebase/firebase-admin-python
Notifications https://github.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python
Fork 347 https://github.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python
Star 1.1k https://github.com/login?return_to=%2Ffirebase%2Ffirebase-admin-python
Code https://github.com/firebase/firebase-admin-python
Issues 79 https://github.com/firebase/firebase-admin-python/issues
Pull requests 38 https://github.com/firebase/firebase-admin-python/pulls
Actions https://github.com/firebase/firebase-admin-python/actions
Projects 0 https://github.com/firebase/firebase-admin-python/projects
Security 0 https://github.com/firebase/firebase-admin-python/security
Insights https://github.com/firebase/firebase-admin-python/pulse
Code https://github.com/firebase/firebase-admin-python
Issues https://github.com/firebase/firebase-admin-python/issues
Pull requests https://github.com/firebase/firebase-admin-python/pulls
Actions https://github.com/firebase/firebase-admin-python/actions
Projects https://github.com/firebase/firebase-admin-python/projects
Security https://github.com/firebase/firebase-admin-python/security
Insights https://github.com/firebase/firebase-admin-python/pulse
New issuehttps://github.com/login?return_to=https://github.com/firebase/firebase-admin-python/issues/698
New issuehttps://github.com/login?return_to=https://github.com/firebase/firebase-admin-python/issues/698
#821https://github.com/firebase/firebase-admin-python/pull/821
Illegal Firebase credential provided. App must be initialized with a valid credential instance error - when using another type of google.auth.Credential object with the SDK.https://github.com/firebase/firebase-admin-python/issues/698#top
#821https://github.com/firebase/firebase-admin-python/pull/821
https://github.com/lahirumaramba
api: corehttps://github.com/firebase/firebase-admin-python/issues?q=state%3Aopen%20label%3A%22api%3A%20core%22
type: bughttps://github.com/firebase/firebase-admin-python/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/LPLabrys99
https://github.com/LPLabrys99
LPLabrys99https://github.com/LPLabrys99
on May 4, 2023https://github.com/firebase/firebase-admin-python/issues/698#issue-1696257852
lahirumarambahttps://github.com/lahirumaramba
api: corehttps://github.com/firebase/firebase-admin-python/issues?q=state%3Aopen%20label%3A%22api%3A%20core%22
type: bughttps://github.com/firebase/firebase-admin-python/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.