FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

Custom Authentication #4781

Closed ricardocosta43 closed 3 weeks ago

ricardocosta43 commented 3 weeks ago

Can we access your project?

Current Behavior

Associate login with firebase, be able to disable user creation automatically and still have access to the Authenticated User Variables

Why do I need this?

I have two apps that share the same firebase project. However, if a user created an account with their email in one app, they cannot create an account in the other app.

Disabling the automatic creation of the Users collection at login disables the Authenticated User variables

Expected Behavior

Being able to create the Users collection at another time and still have the Authenticated User variables available

Steps to Reproduce

1 - Create app 2 - Configure authentication with Firebase (it can just be email) 3 - Create the authentication flow 4 - Disable user collection creation 5 - Right below, create an action to create the user's collection 6 - Check on another screen that the Authenticated user variables are available

Reproducible from Blank

Bug Report Code (Required)

IT4oiMjfsJJNrsNK1aqBbPpVuyQ4G1t6a7gFlMpOGDsdF4iuPOxzacykaRZpUvWnTAhbKEWKjmox0MLzhePLJ+0EOU2rf75z/6h+cQrLRly/aoSoDc+7dHcmGe1MGEii0JjQuCUkNsdoW0FhwV2AHt6vFwrvJu77Zwh9f6PHaOI=

Visual documentation

Captura de Tela 2024-10-30 às 03 59 32 Captura de Tela 2024-10-30 às 04 00 42 Captura de Tela 2024-10-30 às 04 01 46

Environment

- FlutterFlow version: FlutterFlow v5.0.8+ released October 25, 2024
Flutter version is 3.24.2
- Platform: MacOs Sonoma
- Browser name and version: 130.0.6723.71
- Operating system and version affected: MacOs Sonoma

Additional Information

No response

Alezanello commented 3 weeks ago

Hello!

This is the expected behavior. When you disable the "Create User Document" option on login or account creation, it also disables the "Users Collection" setting in Firestore Settings.

I’ve created a 4-minute video explaining the situation and a workaround you can use!

Screen-Recording (33).mp4

ricardocosta43 commented 3 weeks ago

@Alezanello Alezanello hello Thank you very much for the explanation. I understood completely and also understood your point. You showed how I get around this by sending my docReference to appstate. This would work great in an app I'm starting today

However, I have a very very large app already completed and I need to change the authentication method to the way you explained.

I can't go to the 300 places where I use Authenticated User and change them one by one. This is totally out of the question

I sent this issue precisely to see if the flutterflow team can find a solution.

Example.. Create a rule where the user can create the users collection wherever he needs and this is reflected in the Authenticated User variables

And I don't have to change my entire project because flutterflow is limited in this regard.

ricardocosta43 commented 3 weeks ago

My pain is as follows

I have two apps using the same base I just need to test if a user already has an account in an app before flutterflow tries to create a user within the other app and vice versa

Both apps are 100% ready, I just need to adjust it

If you have any alternative to my pain I will be completely grateful.

I'm trying my best not to export to git and mess around manually