简体   繁体   中英

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. The app uses Firebase Authentication and Cloud Firestore, with virtually all app functions depending on this. 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. However, I want to avoid rewriting the entire app in Flutter for now to save time.

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?

The FlutterFire libraries wrap the native iOS and Android SDKs provided by Firebase. So if the user is authenticated in iOS/Android already, the Flutter code should pick that up automatically.

If you're having trouble making this work, post a new question with the minimal complete/standalone code that reproduces that problem .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM