I followed the instructions [here] [1] to implement Google authentication through Firebase. Then I started working with the database. There is a user at the root of each database item, so I followed the instructions [here] [2] and found out that the let user = FIRAuth.auth()?.currentUser allows me to get information about current users.
To make sure that it worked correctly, I logged in and then added it to my code:
let user = FIRAuth.auth()?.currentUser print("I added the below lines to easily find the print(user) statement int the log") print("HERE") print("HERE") print("HERE") print("HERE") print(user)
And, unfortunately, this is a nil seal.
I checked the results of my journal and did not find anything suspicious, but I could have missed something, so [here] [3] is the whole output of the journal.
Is it zero because I did not add the user to the database or something like that?
UPDATE
Now I know that authentication does not work. I confirmed this because after "Signature", when I try to read / write to the database, I get a permission denied error -> the result is not authentication.
source share