简体   繁体   English

如何使用 FireBase 身份验证进行 SSO

[英]How to use FireBase Authentication for SSO

How can one use Firebase to SSO into some product?如何使用 Firebase 单点登录到某些产品中?

Firebase is a federated IdP, meaning, they handle the auth flows for other IdPs, ie Google, Facebook, Twitter, etc. Firebase 是一个联合IdP,这意味着它们处理其他 IdP 的身份验证流程,即 Google、Facebook、Twitter 等。

So how can I set up a product with SSO that is expecting some kind of Auth flow, ie OIDC, SAML, when FireBase doesn't necessarily do that?那么,当 FireBase 不一定会这样做时,我如何使用 SSO 设置需要某种身份验证流程(即 OIDC、SAML)的产品? Note, I am comfortable building my own login pages and using the FireBase SDK, I'm just not sure where to start.请注意,我很乐意构建自己的登录页面并使用 FireBase SDK,只是不知道从哪里开始。

Let's take Google for example.我们以谷歌为例。 I can easily setup Google SSO for my product.我可以轻松地为我的产品设置 Google SSO。 I just generate a client ID/Secret in the Google Dashboard, and then use Google's OAuth flow.我只是在 Google Dashboard 中生成一个客户端 ID/Secret,然后使用 Google 的 OAuth 流程。

  1. My product initiates the login and redirects to Google for logins我的产品启动登录并重定向到 Google 进行登录
  2. Google identifies my user and redirects to my product's callback URL Google 识别我的用户并重定向到我的产品的回调 URL
  3. Done, user is logged in完成,用户已登录

How would I do the same thing in FireBase, which is a sort of middleman between my product and Google?我如何在 FireBase 中做同样的事情,它是我的产品和谷歌之间的一种中间人?

If you have your own user auth system, and you want to integrate that with Firebase Auth for the purpose of creating accounts that integrate with other Firebase products, you can write a custom authentication provider .如果您有自己的用户身份验证系统,并且希望将其与 Firebase Auth 集成以创建与其他 Firebase 产品集成的帐户,则可以编写自定义身份验证提供程序 Your backend will take the user's credentials and create a custom auth token that the app can use to sign in the user.您的后端将获取用户的凭据并创建应用程序可用于登录用户的自定义身份验证令牌

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在其他firebase项目中使用firebase身份验证 - How to use firebase authentication in an other firebase project 如何在 couchbase 同步网关中使用 firebase 身份验证 - How to use firebase authentication in couchbase sync gateway 如何通过 flutter 使用 Firebase 电话身份验证? - How to use Firebase Phone Authentication with flutter? 如何在React Native中使用Firebase Twitter身份验证? - How to use Firebase Twitter Authentication with React Native? 如何在 Firebase 中使用电子邮件和电话进行身份验证? - How to use email and phone to authentication in Firebase? 如何在Android中将多个身份验证提供程序与Firebase一起使用 - How to use Multiple Authentication Providers with Firebase In Android 如何在Vue Native中使用Firebase身份验证 - How to use Firebase Authentication in Vue Native 如何在 viewModel 中使用 firebase 身份验证实例 - how to use firebase authentication instance in viewModel 具有第三方控制的SSO的Firebase(Firestore)自定义身份验证 - Firebase (Firestore) custom authentication with SSO controlled by a third party 当应用程序不使用 Firebase 身份验证时如何保护 Firebase 访问 - How to Secure Firebase Access when App does not use Firebase Authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM