Firebase authentication with Parse user - ios

I'm building an iOS (Swift) app that needs realtime chat as part of the functionality. While Parse works well for push, data storage, etc..., it doesn't support realtime. I would like to use Firebase for the realtime support, but need help authenticating to Firebase using a Parse user. I really don't know where to start with this. Any help would be greatly appreciated.

The question is pretty vague so a definitive answer is not possible: here's a thought.
Firebase and Parse are two different companies and therefore require separate authentications.
If your users have a username/password type authentication in Parse, you could use the same data in Firebase and authenticate through code. i.e. User creates a new account in Parse, and an account is created in Firebase via code. When the user authenticates to Parse, it also authenticates to Firebase via code.
There are a LOT of design elements to consider in going this route: how do you create a firebase user (in code) without your app authenticating itself as a 'super' user? Hard code credentials? That may be a security issue.
Are you going to keep two sets of user data? One in Parse and one in Firebase? What if a user needs to reset their password or account. As you can see, it can get out of control rather quickly.
You may want to consider sticking with one platform to simplify the entire process. By the sound of at least one of the requirements, Firebase can do much of what Parse can do but also give the real-time updates you need.

Related

IOS Offline Login

Stange question, I'm looking to create an app for the company I currently work for which will hold all passwords for the software and platforms we use. I would like to be able to create some kind of login or authentication without connecting to the internet or using a post to HTTP.
Is this kind of thing possible? Even if I was to keep it to one username and password across the board. Or is it going to be better to only distribute to people that I know?
The only reason I want to do this is so that when downloaded from the App Store it would be only engineers that could login.
Thanks in advance!
For this you can add json file that contain all the data of the users for initial state and for user registration you can use core data. But you want to syncing with registered data and json file you need to fire silent api call to server.

"Copy this file to your authentication server" - Firebase Custom auth

My goal is to prevent users of multiple login in. I do not want this to be client-side, with like the onDisconnect and onConnect values, but with a server check. I came across this answer:
How to prevent simultaneous logins of the same user with Firebase?
Which tells me to create a custom auth system. When I am following the docs (https://firebase.google.com/docs/auth/ios/custom-auth) I need to "Copy this file to your authentication server" (3c). How would I do this? I am just using Firebase and my little iOS app. I would like to manage everything on these 2 things, no server in between, is this possible? Or can this file only be uploaded through another server?
If above things are not possible, how can I server check if the user really signed in? I am using Cloud Functions, but I did not came across a trigger for a user signing in. Please no answers with onDisconnect/onConnect, I want it server side. A user may NOT login if he is already logged in. Thanks :)
Implementing custom authentication requires that you have a secure place to mint the custom token that identifies each of your users. You cannot do this securely with only client-side code, because that would mean everyone could claim to be whoever they want.
While you can use Cloud Functions for Firebase to implement a secure back-end without spinning up your own server, I highly recommend against doing that just for the purpose of preventing a user to sign in from multiple locations.
It's important when talking about security to split these two steps:
Authentication - a user proving to be who they are
Authorization - the authenticated user being able to use your app
There very seldom is a reason to keep a user from proving who they are. Your concern seems to fall onto keeping them from using the app from multiple locations. To do that, it's probably easier to track for each user where they are using the app from already using Firebase Database's presence system.
Also see:
How to handle multiple connections of the same user on Firebase?
Android - How to detect same user from multiple devices?
How to prevent same user logging in from different devices ? My app is paid , so I dont want credentials to be shared

How to persist data across multiple iOS devices accessed via Facebook authentication?

I have an iOS app using Swift that uses Core Data to store user data on thousands of objects. I also have FB Auth working. My question is, how do I make it so that the user data would persist even when they switch phones and log in using FB on a separate phone? It doesn't seem that FB will offer me such data persistence. I'm looking at making a server on Heroku with Vapor. Then I could use the user's e-mail as a way to identify the user... but it doesn't seem secure?
Any suggestions on easiest solution?
Checkout Firebase... Instead of using e-mail to authenticate users, you should deal with tokens. Firebase will provide you a great data flow in easiest manner.

IOS user registration

I want to create a user login system that will eventually handle a lot of users and information linked to the users. I've looked a lot into core data but can someone tell me from experience how I should handle my data? Should I use core data? Also I'm programming in swift.
Singing in/up with an email is important for almost every app that requires a social interaction. In the past, developers often used Parse (backend-provider) as to implement a login system. But, Parse is closing down soon. So, here we have another solution, as someone mentioned, "Firebase". Firebase allows you to quickly create a login system integrated with email, Facebook, Github, Google, you name it. You are also able to store user information such as photos and personal information using Firebase's core feature known as 'Real time database' and "Storage". Here is a quick introduction for you to learn more about Firebase!
Introduction to Firebase Authentication
https://www.youtube.com/watch?v=8sGY55yxicA
Introduction to Firebase Database
https://www.youtube.com/watch?v=U5aeM5dvUpA
Login Tutorial by Jared
https://www.youtube.com/watch?v=8sRUhzgJhcY
There is a learning curve, but let me know if you are stuck,
read the documentation and "get started guideline"
https://firebase.google.com/docs/ios/setup
If you find this information useful, I would appreciate your thumbs up!

Authenticating Parse users on Firebase

I have a pretty common use case that was unfortunately vaguely described in this question:
Firebase authentication with Parse user
I am using Parse as my backend and I want to add real-time chat using Firebase.
20% of users will use chat, so it would be inefficient to replicate all users on Firebase (on Parse signup).
I would like to sign the user up in the background when he starts a chat with another user.
I believe this raises some security concerns, among others, which leads me to my question:
What is the most efficient and secure way to tackle this problem ?

Resources