firebase 谷歌登录
This article is originally published at https://swiftsenpai.com on June 15, 2020.
本文最初于 2020年6月15日 发布在 https://swiftsenpai.com 上。
When it comes to third party backend authentication services for iOS apps, the first that comes to mind for sure is Firebase Authentication. By using Firebase Authentication, iOS developers can skip the hassle of setting up a secure backend server and only focus on the mobile side implementation.
当涉及针对iOS应用的第三方后端身份验证服务时,首先想到的肯定是Firebase身份验证。 通过使用Firebase身份验证,iOS开发人员可以跳过设置安全后端服务器的麻烦,而只专注于移动端实现。
Even though Firebase Authentication and Google Sign-in for iOS are both products of Google, they do not automatically integrate with each other.
尽管Firebase身份验证和iOS的Google登录都是Google的产品,但它们不会自动相互集成。
In this article, I will show you, step-by-step on how to set up Firebase for your iOS project and integrate it with Firebase Authentication.
在本文中,我将逐步向您展示如何为iOS项目设置Firebase并将其与Firebase身份验证集成。
先决条件 (Prerequisite)
This article is the continuation of my previous article Google Sign-In Integration in iOS. If you do not have an iOS app that is already integrated with Google Sign-in, I highly recommend you to go through the previous article before proceeding with this one.
本文是我上一篇文章iOS中的Google登录集成的继续。 如果您还没有与Google登录集成的iOS应用,我强烈建议您先阅读上一篇文章,然后再继续进行本文。
As a quick recap, here’s where we left off:
快速回顾一下,这是我们离开的地方:
We have successfully integrated Google Sign-in into our sample app, which means users can sign in to the sample app using their Gmail account without any problem.
我们已成功将Google登录功能集成到示例应用程序中,这意味着用户可以使用其Gmail帐户登录该示例应用程序而不会出现任何问题。
With that being said, let’s get right into Firebase Authentication integration.
话虽如此,让我们直接进行Firebase身份验证集成。
创建Firebase项目 (Create Firebase Project)
Head over to Firebase Console and create a Firebase project for your sample app.
转到Firebase控制台,并为您的示例应用程序创建一个Firebase项目。
After clicking on “Add Project”, you will be presented with a list of Google