I'm about to develop a P2P native chat app for android using react native. I would like to log in my user by asking for a username and a password. In case the user forgets his password is there any way to reset it without create the user from the start and losing all the data stored in device like chats or contacts?
Related
I have a scenario and looking solution for that. I am working on an application and Using Firebase to create and authenticate the User. In my app, basically two types of users (1.User & 2. Vender) and User can signIn on app but vender need to login on web panel. We are using firebase default method (.createUser) to create user and it's already working.
Now I wants to create Vender profile too in same app but Vender can login only on web app and user can login on Mobile app.
Is it possible ? If yes then please guide me that how it's possible ?
Thanks in advance.
This is a fairly open-ended question but I think it comes down to two things: determining the user type (vendor or user) and detecting what platform they are signing up on.
Both are pretty easy.
Heres's the structure which leverages a /users node to store additional info about the user. From Storing User Data
users
uid_0
name: "William:
type: "vendor"
uid_1
name: "Leonard"
type: "user"
and then when the user attempts to log in, the app checks their user authentication, which will result with authData.uid being populated.
Then it would look up the user via authData.uid and check the user type. If it's a Vendor, display a message to the user that they must log in via the web portal, and don't proceed into the app.
There's a 100 other ways to handle this - setting up a Vendors Node and a Users node for the app to auth against to having them select Vendor Or User before entering their authentication credentials.
in my app at Login screen, I'd like to auth a user by two text inputs, where user could type either Email or Phone number, and password.
There's question, does it possible to auth user by phone and password? or phone auth uses by sending SMS code?
you can't use phone auth using web sdk.
It doesn't support it but native sdk does.
Using react-native-firebase, you can use native sdk(android, ios) with react-native.
react-native-firebase
My Ionic 3 mobile app i'm currently building allows login with firebase using both Email/Password and Facebook providers.
Everything's working great - but when the user logs in, in order to have a 'remember me' function that prevents them having to log in every time the app is closed (closing the app fully, or the system kills it), i need to be able to get some sort of token, store it, then use it later to take them straight past the authentication screen.
I've managed this already, but currently i'm storing their email and password, and i know this is a horrible thing to do. (I'm using Ionic Storage).
Is there a way to get a token that represents a user, and can be used to re-authenticate them?
I know about custom token logins, but they can only be created in NodeJS using the admin SDK - is there any solution i can run directly on the phone?
Thanks.
Story
I am developing an app that will be used from desktop and mobile browser (NodeJS, JS, HTML, CSS). I am also planning to wrap it with phonegap or react native to make it a downloadable/installable mobile app later.
Users can sign up with username and password. But the user account will be activated only after user's thumb fingerprint validation. This is to avoid duplicate/ghost accounts bring created.
Note
Fingerprints are not good passwords. So I am only planning to use them to activate account. After an account is activated users will login using usual username and password.
Queries
How to get user's thumb fingerprint or a unique token that represents fingerprint in HTML, JS, CSS?
Is there anything else that will stop duplicate/ghost account other than fingerprint?
I am new to PhoneGap development. My PhoneGap application has a login page and I need to implement a "Remember Me" option into this login page. If the user has checked the "Remember Me" checkbox after entering username & password, the application should remember the user entered username & password and auto fill the information the next time the user launch the application (i.e. username & password should be persisted even when the application is closed, phone is restarted etc).
What is the best approach to implement this in a PhoneGap application..?
I know I can write the username and password to a file and read it back when app is launched. But I have a feeling that this is not the best way to do this due to various reasons including security.
Thanks in advance.
You can look into using an SQLLite database or LocalStorage, as documented here.