Migrate from Firebase to NodeJs + MongoDB - Authentication and Storage - node.js

I am planning to migrate the backend of my app, which currently uses Firebase to a NodeJS + MongoDB server. I don't know much about Node and Mongo but I know that it is possible to export the database through a JSON file. The problem would be the login system and the files saved on Storage.
 All my users can login with email and password and also by phone number. Is it possible to migrate this authentication system or do I have to start over from scratch?
Another question: is it possible to migrate data from Storage to the new server? Thanks in advance!

Is it possible to migrate this authentication system or do I have to start over from scratch?
You can define users that have both an email address and a phone number and match either one when authenticating.
is it possible to migrate data from Storage to the new server?
Yes.

Related

How to use Firebase Auth to register/login/mint token but Mongodb for everything else?

--First time poster, mods please let me know if the question is inappropriate/incorrect--
Situation:
I'm working on an app with friends. We have a dedicated frontend layer and a dedicated nodejs server running MongoDB. I am trying to integrate firebase into our server layer so we can login users and handle minting/verifying/refreshing tokens using Firebase Auth.
Problem:
I'm completely lost as to how to use Firebase Auth for this purpose. I've looked through the docs extensively, I first went down the "Getting Started with Firebase on an App", until I realized (I think) that guide was specifically for web applications without a dedicated backend.
Then I looked more into Firebase Auth Admin, which looked more like what I was looking for. I tried messing with custom token creation and other authentication related matters but I fail to be able to log in.
I reached out to friends for help, they recommended getting local login/googleauth working End-to-end using firebase before trying to secure our tokens moreso than they already are.
I'm very lost and not sure if I'm misunderstanding something fundamental or just not applying the right things. I apologize if this is unclear, I'm just trying to allow email/password login using firebase auth to securely authenticate with my MongoDB data (if that's even necessary)
Any guidance would be appreciated!
You're absolutely right with your approach and its possible to use Firebase Auth for just login/signup and rest of all on mongoDB.
There are 2 ways u can implement the Firebase Auth-
Using the sdk provided by Firebase
Using the Admin Auth API
Which ever way you selected, Later on save your UID on your custom Backend (Which is backed by MongoDB)
Just create your API's to verify user identity.
If you're using NodeJs you can follow this tutorial.

Couch authentication. New react native project

I'm starting up a new project using Couch DB and a react native front end. I was wondering what is the recommended way of doing user authentication. weather it is setting up users in Couch DB or going through, for example, a node server to process user credentials and get a token for them and whatnot. or if there are any other ideas, I'd greatly appreciate that.
CouchDB authentication system is a bit limited:
You can't revoke sessions
It somehow hard to integrate third party authentication (facebook, google+)
Password recovery/reset is not available by default
Since you're building a client application, you can't implement password recovery on the client side. You'll need a backend service that handle this.
It all depends on your need. You can easily start with CouchDB's auth system and add a auth service on top of CouchDB later.

UWP location to hold local user permissions?

Im writing a application where I can have multiple users login and store their password in windows credentials. I currently can successfully validate the user's login. My question is where is the proper place to store the permissions(ex access to a certain page). I have several databases but I don't think that's secure. Possibly encrypt the data in the table. Or maybe in the local settings
You should use the PasswordVault class in a UWP app for storing user credentials so the app can validate silently to your cloud service later. Here are details on how to use the API.
for non-password, non-sensitive data, you can store it in LocalStorage or RoamingStorage but that is not secure. The only secure location to store data is on your service. Look to use something cloud-based like Azure Mobile apps to store that kind of info.

I have nodejs bot deployed it on azure and I want to authenticate all the user with azure active directory

https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-lob-application-azure-ad/#configure-authentication-and-directory-access
I have done the azure side configurationb by this document but which part should i add to my bot and get the access token from
https://microsoftluisbot.azurewebsites.net/.auth/me
Depending on your timeframe and if you want to do it yourself; you will have to take a look to passport.js, specifically to the Azure Ad strategy.
If you are not in a rush, then you might want to wait until the node.js version of AuthBot is ready. Based on this post, it seems Mat is already working on it.
Update Nov-28
A preliminary version of AuthBot for Node.js can be found at https://github.com/CatalystCode/node-authbot/

Finding 2nd and 3rd level connection using Facebook

I am developing a webapp and one of the functionalities is the way how linkedin connections work.
For a given 2 users, we show the path of connections for 3 levels.Is there a way this could be achieved using Facebook API.
I am allowing user to login using facebook credentails and saving the tokens in MongoDB.I used node js for server side processing.
Any help is appreciated.
No, this is not possible via the Graph API. You can only get those friends which are also using your app, not all friends (if your app is >=v2.0).

Resources