Auth login and realtime database problem connection

That happened to me a lot. Try to make the authentication on 1 Screen and Database on the Next Screen. Save the UserID Somewhere to use it later.

That fixed the problem for me with the same Database Rules. It’s safer with it.