How do you keep user login?

I mean once user login, they will always stay in the screen3 unless they clicking on logout button, then they will back to the screen1 which is login interface. (Note: Now I using firebase as database to make user login)

with firebase authenticated users or with your own login setup ?

But how... Any example?

firebase realtime db

Is that a question or a statement ?

question u asked earlier "With firebase authenticated users or with your own login setup?"
So my answer is 'firebase realtime db'

Firebase authentication is separate from realtime database....but can then be used to authenticate posts in realtime database

You can run your own login system in realtime database.

You should provide more details if you want to answer the question from 9 months ago......

so, is there a way?
if an authenticated user read a realtime database and post automatically when it open the app and login, the next time when open the app to bypass the login screen?

The current token will only last an hour.

You can run a procedure to fetch a new token using the refresh token, in order to keep a user signed in.

thank you very much TIMAI2,
so I need to use a web set url to database and web,get only? or I need to replace existing token with new one? Don't really understand how it works.

1 Like

wow thank you so much!

I cant make it work!
Is this something that I can use to keep the user logged in after 60 min?

Firebase Authentication with Web component and HTML

but how? from where I get email, level pass etc? Thank you!

...maybe you have an aia file?

Show your web component blocks (not webviewer)

I am working up an example...

This seems to do it:

fbRefreshLogin (2).aia (4.4 KB)

You will, of course, need to do more work with this to get a new idToken when the user first opens the app, or when they return to the app when it has been in the background, or when the hour is almost up.

[EDIT - I have now added this to my Firebase with Web Component Guide]

wow, thank you so much, you are the best.
For sure I will make it work, now I have a very good base. Thank you!!!! send you a coffee! METRIC RAT AI2 is your website right?


Sorry, I used the wrong variable for the getNewIdToken.

I have updated the original blocks and aia.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.