-
Notifications
You must be signed in to change notification settings - Fork 4k
feat(ui): add firebase_ui_auth and oauth providers #9343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
339835d
feat(ui): add firebase_ui_auth and oauth providers
lesnitsky 8320499
chore(ui): fix unit tests
lesnitsky 52e9595
chore(ui): fix e2e tests
lesnitsky 0cb2ec4
chore(ui): fix example dependency
lesnitsky 9fffd49
chore(ui): fix OAuthProviderButton test
lesnitsky a4c4f9a
chore(ui): fix email verification domain
lesnitsky 5dec282
fix(ui): fix keyboard overlapping sign in screen ui
lesnitsky 1ae1248
feat(ui): reload user when app goes back to foreground
lesnitsky 358559d
fix(ui): fix reauthenticate dialog
lesnitsky a5ee4c0
fix(ui): fix dependencies
lesnitsky c0af2d6
fix(ui): fix default resizeToAvoidBottomInset
lesnitsky a9b1f99
fix(ui): fix review comments
lesnitsky dedc53c
fix(ui): use Text.rich instead of RichText
lesnitsky 9051ce0
fix(ui): fix phone and sms code input for RTL locales
lesnitsky d70108c
fix(ui): fix sign in action button on delete account action
lesnitsky a113bdd
fix(ui): fix description, repository and homepage URLs
lesnitsky 8affb5e
Merge branch 'master' into ui/auth
lesnitsky 79261f2
chore(ui): trigger CI
lesnitsky e8e9388
docs(ui_auth): fix review commets
lesnitsky 83e5bfb
chore(ui_auth): drop unnecessary assets folder
lesnitsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
/pubspec.lock | ||
**/doc/api/ | ||
.dart_tool/ | ||
.packages | ||
build/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: f1875d570e39de09040c8f79aa13cc56baab8db1 | ||
channel: stable | ||
|
||
project_type: package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## 1.0.0-dev.0 | ||
|
||
- Bump "firebase_ui_auth" to `1.0.0-dev.0`. | ||
|
||
## 0.0.1 | ||
|
||
* TODO: Describe initial release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Copyright 2017, the Chromium project authors. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Firebase UI Auth | ||
|
||
[](https://pub.dev/packages/firebase_ui_auth) | ||
|
||
Firebase UI Auth is a set of Flutter widgets and utilities designed to help you build and integrate your user interface with Firebase Authentication. | ||
|
||
> Please contribute to the [discussion](https://github.com/firebase/flutterfire/discussions/6978) with feedback. | ||
|
||
## Platoform support | ||
|
||
| Feature/platform | Android | iOS | Web | macOS | Windows | Linux | | ||
| ------------------ | ------- | --- | ---------------- | ---------------- | ---------------- | ---------------- | | ||
| Email | ✓ | ✓ | ✓ | ✓ | ✓ <sup>(1)</sup> | ✓ <sup>(1)</sup> | | ||
| Phone | ✓ | ✓ | ✓ | ╳ | ╳ | ╳ | | ||
| Email link | ✓ | ✓ | ╳ | ╳ | ╳ | ╳ | | ||
| Email verification | ✓ | ✓ | ✓ <sup>(2)</sup> | ✓ <sup>(2)</sup> | ✓ <sup>(1)</sup> | ✓ <sup>(1)</sup> | | ||
| Sign in with Apple | ╳ | ✓ | ╳ | ✓ | ╳ | ╳ | | ||
| Google Sign in | ✓ | ✓ | ✓ | ✓ | ✓ <sup>(1)</sup> | ✓ <sup>(1)</sup> | | ||
| Twitter Login | ✓ | ✓ | ✓ | ✓ | ✓ <sup>(1)</sup> | ✓ <sup>(1)</sup> | | ||
| Facebook Sign in | ✓ | ✓ | ✓ | ✓ | ✓ <sup>(1)</sup> | ✓ <sup>(1)</sup> | | ||
|
||
1. Available with [flutterfire_desktop](https://github.com/invertase/flutterfire_desktop) | ||
2. No deep-linking into app, so email verification link opens a web page | ||
|
||
## Installation | ||
|
||
```sh | ||
flutter pub add firebase_ui_auth | ||
``` | ||
|
||
## Getting Started | ||
|
||
Here's a quick example that shows how to build a `SignInScreen` and `ProfileScreen` in your app | ||
|
||
```dart | ||
import 'package:flutter/material.dart'; | ||
import 'package:firebase_auth/firebase_auth.dart'; | ||
import 'package:firebase_ui_auth/firebase_ui_auth.dart'; | ||
|
||
class MyApp extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
const providers = [EmailAuthProvider()]; | ||
|
||
return MaterialApp( | ||
initialRoute: FirebaseAuth.instance.currentUser == null ? '/sign-in' : '/profile', | ||
routes: { | ||
'/sign-in': (context) { | ||
return SignInScreen( | ||
providers: providers, | ||
actions: [ | ||
AuthStateChangeAction<SignedIn>((context, state) { | ||
Navigator.pushReplacementNamed(context, '/profile'); | ||
}), | ||
], | ||
); | ||
}, | ||
'/profile': (context) { | ||
return ProfileScreen( | ||
providers: providers, | ||
actions: [ | ||
SignedOutAction((context) { | ||
Navigator.pushReplacementNamed(context, '/sign-in'); | ||
}), | ||
], | ||
); | ||
}, | ||
}, | ||
); | ||
} | ||
} | ||
``` | ||
|
||
Learn more [here](https://github.com/firebase/flutterfire/packages/firebase_ui_auth/doc/README.md). | ||
|
||
## Roadmap / Features | ||
|
||
- For issues, please create a new [issue on the repository](https://github.com/firebase/flutterfire/issues). | ||
- For feature requests, & questions, please participate on the [discussion](https://github.com/firebase/flutterfire/discussions/6978) thread. | ||
- To contribute a change to this plugin, please review our [contribution guide](https://github.com/firebase/flutterfire/blob/master/CONTRIBUTING.md) and open a [pull request](https://github.com/firebase/flutterfire/pulls). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "SocialIcons", | ||
"css_prefix_text": "", | ||
"css_use_suffix": false, | ||
"hinting": true, | ||
"units_per_em": 1000, | ||
"ascent": 850, | ||
"glyphs": [ | ||
{ | ||
"uid": "f06fe7ff18d1c591bc1183cb3ab105e9", | ||
"css": "google", | ||
"code": 61856, | ||
"src": "fontawesome" | ||
}, | ||
{ | ||
"uid": "8e04c98c8f5ca0a035776e3001ad2638", | ||
"css": "facebook", | ||
"code": 61594, | ||
"src": "fontawesome" | ||
}, | ||
{ | ||
"uid": "e9fa538fd5913046497ac148e27cd8ea", | ||
"css": "apple", | ||
"code": 61817, | ||
"src": "fontawesome" | ||
}, | ||
{ | ||
"uid": "627abcdb627cb1789e009c08e2678ef9", | ||
"css": "twitter", | ||
"code": 61593, | ||
"src": "fontawesome" | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember now, but do we need this? I just ran

melos version
and it produced another version:version -
1.0.0-dev.1
🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how this works either. We've put this manually for the dev release.
Next release should be without
-dev.1
postfix, but rather regular1.0.0
version.I believe this should be done with
--graduate
.As for actual changelog – it'd just mention a stable release and point to the migration guide in docs section.