Additionally, I wanted to store user information on firestore database so once the record is created, the second create record flow records the user information. Once it is all over I redirect them to the login page.
I could also redirect them to home page without additional login but people tend to forget the passwords so I wanted to make sure they at least log in once.
I’m not sure if this is the best practice but for me it works. Of course I’m open to suggestions.
Thank you for supplying the screenshots and your steps. They worked for me and I am very grateful that you took the time to make your response. I am sure it will help a lot of others also.
I do have a follow-up question though, what is a good way to link the newly created user to details they entered into the form during registration in to the firestore database, like First Name, Last Name, Phone Number, etc.?
@Robert_Doodles, once I receive the response from the register request, I initiate the second post request as shown in my previous flow screenshot. For the other form values, I created page variables for all of them and set them to the values, but I think creating one data variable is a better choice (which I will fix on my part). I also use the flow output value for authorization uid into my user identity database.
I use firestore database and created the firestore data source in AppGyver. I don’t have anything fancy:
What I really would like to do is mapping the UID from auth and the document ID. It should be possible for rest API data source but I don’t think it is currently possible for firestore data sources. Perhaps @Mari could provide an answer there.
For some reason, the second create record (for other user-related info like name, etc.) keeps failing. I think it may be due to the rules in Firebase which are: allow read, write: if request.auth != null;
Do you have this rule? Or do you allow writes without auth?
After changing my security rules I also started receiving authorization errors. I added the email authentication flow between the two requests. So once registration is successful, I use the same email&password parameters to authenticate the user, then start the second record creation.
Hi there, regarding mapping Doc ID and User there is a workaround where you can create a specific Doc ID (ie UserUid) and therefore have a ref like this. That way you are just fine with calling Get record (as that require doc id) instead of collection.
Hope that makes any sense. You can check my previous posts, where I already tried to explain that.
I must state the pleasant surprise reading “Aramıza Hoş Geldiniz” in your screen-grab (Confessing that I had not read your name fore-hand)…
Çok sağol Atakan! Harikasın!
For reasons I could not understand: after I change privacy settings: I always got an error on some phones while none in others. Oddly… this solved much: THANK you.
What exactly do you refer to as you mention “creating one data variable”?
Do you mean that it is to be set up WHILST signing up?
If so: HOW?
Are you able to customize firebase user data?
What happens then? Do you also provide “user based” authorities fireBase based (Tongue-Twister )? Or would you personally advise to keep it locally with simple if functions?
To better explain my point (More-what my plans):
An administrative user capable of adding/removing authority sort of checking your “HasClub” on/off… That is cool… And what I want… But would be VERY cool is that the administratively authorized user actually fills in users on his own… from the app (Just like he can add users from fireBase itself). And to date I thought it to be impossible/not permitted. But your mentioning “one data variable” got my hopes up and I couldn’t help but burden you with more replies through which you have to date been so helpful with.
Would you please be kind enough to link us to it? Had you meant THIS one?
As I understand: you are actually answering the question I am asking… But I failed to take it home as of yet.