What is the best way to make a sign in page? Stored Variables or Sign in?

I had trouble choosing which thing to use for a sign in page.
I was thinking of what I could use for a sign in page, stored variables or the Sign in thing?

This is what I’m talking about the sign in thing in case you guys don’t understand:
image
So it would be helpful if someone could figure which is the best way.

Thanks friends.

1 Like

See this tutorial from Thunkable

It uses both the Sign In component and the stored variables.

You use the Sign In component to authenticate and verify the user using the email/password combination.

In order not to force the user to type in the email and password every time the app starts, you will use stored variables to store the user email and password and pass it automatically to the app to allow the user to sign in to your all automatically.

So, for best practice, you need to use both the Sign In component and the stored variable in your app.

Hope this clarifies the matter.

2 Likes

Thanks a lot I’ll watch the video.

1 Like

For what it’s worth, I’m using the technique in the video above for an app I’m developing. It works really well. Although I’m generating a random email and password because I don’t need the user to actually sign in… I just need Firebase authentication which it provides. But that’s kind of a tangent.

3 Likes

I use Airtable in one of my apps as I need to be able to create and then have full control over the user names and passwords. I then use a variable to control whether the login is user or admin for that session.

2 Likes

@codelover1234
Sign in (from Firebase) is SO easy - and free - there’s not really much reason not to use it! :smiley:

The only reason I would use something else is if I need users to sign into an external API (generally for work purposes), or to link the Firebase login to an external set of data e.g. multiple APIs.

I also use the OneSignal component as it gives a unique ID which one can store if inclined. For example; to identify users in another system when submitting data, or to unregister users via OneSignal if they don’t want to receive notifications.

2 Likes

Thanks for the answer.

Hi,
I have one question. Is the API Key and Database URL necessary? Because I’m gonna need to learn how to use fire base and the the API key and database URL. So if you could help me, that would be great.

1 Like

You can only access Firebase and retrieve data and save data when you provide the API key and Database URL in the project settings.

This is the connection between your project and your Firebase database.

Thanks for the info. But there seems to be a problem while previewing my app. It said that my API key is invalid and check if i have copied it

1 Like

Can you verify that the API key and Database URL are saved in the project settings?

lemme check.

1 Like

It doesn’t.

1 Like

How do I exactly get the API Key and Database URL?

Have you created a Firebase project?
If you do you need to also choose web project. The API key will be in the configuration setup code of the web project.

The database URL is also in the same configuration file.

I have never even created a firebase project. So could you give me some kind of small easy-to-follow tutorial so I know what I should do?

1 Like

See this tutorial from @darren

1 Like

Thanks a lot. I’ll watch the video.

Hi @muneer,
I have a problem with my Sign in Page. I’ve copied the API Key and Database URL but while I was previewing my Sign in page, it said please verify your email. Here is the screen:

And here is the code/blocks:

Is there anything wrong?

1 Like

The blocks you are using change the value of the label to “Please verify your email” if the email hasn’t been verified yet. Check your email inbox and click on the verification link/button to complete the sign up.

2 Likes