Skip to content

[Bug]: Facebook and Google Login #6

Open
@mthnzbk

Description

@mthnzbk

Is there an existing issue for this?

  • I have searched the existing issues

Environment

-   OS: W11
-   Python:3.10

What happened?

`Traceback (most recent call last):
File "C:\Users\venv\lib\site-packages\firebase_exception.py", line 13, in raise_detailed_error
request_object.raise_for_status()
File "C:\Users\venv\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://www.googleapis.com/identitytoolkit/v3/relyingparty/createAuthUri?key=AIzaSyDFP8PMnJzIl-4q8fsnkz1uvEPE3nHivcA

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\main.py", line 34, in
print(auth.authenticate_login_with_facebook())
File "C:\Users\venv\lib\site-packages\firebase\auth_init_.py", line 78, in authenticate_login_with_facebook
return self.create_authentication_uri('facebook.com')
File "C:\Users\venv\lib\site-packages\firebase\auth_init_.py", line 127, in create_authentication_uri
raise_detailed_error(request_object)
File "C:\User\venv\lib\site-packages\firebase_exception.py", line 17, in raise_detailed_error
raise HTTPError(e, request_object.text)
requests.exceptions.HTTPError: [Errno 400 Client Error: Bad Request for url: https://www.googleapis.com/identitytoolkit/v3/relyingparty/createAuthUri?key=AIzaSyDFP8PMnJzIl-4q8fsnkz1uvEPE3nHivcA] {
"error": {
"code": 400,
"message": "INVALID_CONTINUE_URI",
"errors": [
{
"message": "INVALID_CONTINUE_URI",
"domain": "global",
"reason": "invalid"
}
]
}
}`

I think I entered the information correctly. this is the error I get.
auth = firebase.auth(client_secret="client_secret.json") auth.authenticate_login_with_facebook()
client_secret.json:
{ "client_id": "1234", "client_secret": "1a2s", "redirect_uris": "https://xxx.firebaseapp.com/__/auth/handler" }

Code Snippet

import firebase

config = {
    "apiKey": "-",
    "authDomain": ".firebaseapp.com",
    "databaseURL": "https://.europe-west1.firebasedatabase.app",
    "projectId": "",
    "storageBucket": ".appspot.com",
    "messagingSenderId": "",
    "appId": "1::android:",
    "serviceAccount": "firebase.json"
}

firebase = firebase.initialize_app(config)
auth = firebase.auth(client_secret="client_secret.json")
print(auth.authenticate_login_with_facebook())

Relevant log output

No response

Anything else?

No response

Metadata

Metadata

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions