简体   繁体   English

嵌入式 Flutter 应用程序和本机 Android 中的 Firebase 身份验证

[英]Firebase Authentication in both Embedded Flutter app and Native Android

I have been working on a native Android app written in Java for some time now.一段时间以来,我一直在研究用 Java 编写的原生 Android 应用程序。 The app uses Firebase Authentication and Cloud Firestore, with virtually all app functions depending on this.该应用程序使用 Firebase 身份验证和 Cloud Firestore,几乎所有应用程序功能都依赖于此。 Users are asked to sign in near the startup of the app.要求用户在应用程序启动时登录。

I recently learned about the Flutter cross-platform framework and I am interested in writing new features/UI components of the Android app in Flutter in order to eliminate iOS development down the line. I recently learned about the Flutter cross-platform framework and I am interested in writing new features/UI components of the Android app in Flutter in order to eliminate iOS development down the line. However, I want to avoid rewriting the entire app in Flutter for now to save time.但是,我想暂时避免在 Flutter 中重写整个应用程序以节省时间。

Since new UI components would require users to be authenticated and using cloud firestore, is there a way to authenticate the user on both the embedded Flutter app and the existing native Android at the same time, without requiring them to sign in on each?由于新的 UI 组件需要用户进行身份验证并使用云 Firestore,有没有办法同时在嵌入式 Flutter 应用程序和现有的本机 Android 上对用户进行身份验证,而不需要他们分别登录?

The FlutterFire libraries wrap the native iOS and Android SDKs provided by Firebase. FlutterFire 库封装了 Firebase 提供的原生 iOS 和 Android SDK。 So if the user is authenticated in iOS/Android already, the Flutter code should pick that up automatically.因此,如果用户已经在 iOS/Android 中进行了身份验证,则 Flutter 代码应该会自动选择它。

If you're having trouble making this work, post a new question with the minimal complete/standalone code that reproduces that problem .如果您在完成这项工作时遇到问题,请使用重现该问题的最少完整/独立代码发布一个新问题

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

相关问题 PWA 能否嵌入 Flutter 应用程序中,用于 Android 和 iOS? - Can a PWA be embedded in a Flutter app for both Android and iOS? Flutter Android平台firebase电话号码认证应用崩溃 - Flutter app crashes on firebase phone number authentication in Android platform Web应用程序和本机应用程序的身份验证 - Authentication for both web application and native app 在 Flutter 网页和移动应用中使用 Firebase - Use Firebase in both Flutter web AND mobile app android 和 ios 的 React Native 指纹认证 - React Native fingerprint authentication for android and ios both Flutter Firebase 身份验证与 Google App 崩溃 - Flutter Firebase Authentication With Google App Crash Flutter Firebase Android 上的电话验证错误 - Flutter Firebase Phone Authentication error on Android Expo react-native app with firebase phone authentication works on web, error on ios simulator and crashes with no warning on Android - Expo react-native app with firebase phone authentication works on web, error on ios simulator and crashes with no warning on Android 如何在 flutter 中对 android 和 iOS 进行面部身份验证 - How to do face id authentication for both android and iOS in flutter 使用客户端/应用程序身份验证而不是用户身份验证的 Firebase Android 应用程序 - A Firebase Android app with client/app authentication instead of user authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM