Skip to content

Commit 1e975bc

Browse files
Merge branch 'firebase:main' into separated_loading_indicator
2 parents 836dc31 + a36884d commit 1e975bc

File tree

120 files changed

+2072
-402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+2072
-402
lines changed

.github/ISSUE_TEMPLATE/BUG-REPORT.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Bug Report
22
description: File a bug report
33
title: "🐛 ISSUE TITLE"
4-
labels: ["bug", "triage"]
5-
assignees:
6-
- lesnitsky
74
body:
85
- type: markdown
96
attributes:

.github/workflows/code_health.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
analyze:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- uses: subosito/flutter-action@v2
2525
with:
2626
channel: "stable"
@@ -34,7 +34,7 @@ jobs:
3434
pub_dry_run:
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v3
37+
- uses: actions/checkout@v4
3838
- uses: subosito/flutter-action@v2
3939
with:
4040
channel: "stable"
@@ -50,7 +50,7 @@ jobs:
5050
pub_get_check:
5151
runs-on: ubuntu-latest
5252
steps:
53-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
5454
- uses: subosito/flutter-action@v2
5555
with:
5656
channel: "stable"
@@ -66,7 +66,7 @@ jobs:
6666
format:
6767
runs-on: ubuntu-latest
6868
steps:
69-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@v4
7070
- uses: subosito/flutter-action@v2
7171
with:
7272
channel: "stable"
@@ -99,7 +99,7 @@ jobs:
9999
runs-on: ubuntu-latest
100100
timeout-minutes: 30
101101
steps:
102-
- uses: actions/checkout@v3
102+
- uses: actions/checkout@v4
103103
- uses: actions/setup-go@v4
104104
with:
105105
go-version: "^1.13.1"

.github/workflows/ossf-scorecard.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: "Checkout code"
35-
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.1.0
35+
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3.1.0
3636
with:
3737
persist-credentials: false
3838

@@ -59,14 +59,14 @@ jobs:
5959
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6060
# format to the repository Actions tab.
6161
- name: "Upload artifact"
62-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
62+
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
6363
with:
6464
name: SARIF file
6565
path: results.sarif
6666
retention-days: 5
6767

6868
# Upload the results to GitHub's code scanning dashboard.
6969
- name: "Upload to code-scanning"
70-
uses: github/codeql-action/upload-sarif@00e563ead9f72a8461b24876bee2d0c2e8bd2ee8 # v2.21.5
70+
uses: github/codeql-action/upload-sarif@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9
7171
with:
7272
sarif_file: results.sarif

.github/workflows/pr_title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
name: PR title validation
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54
20+
- uses: amannn/action-semantic-pull-request@47b15d52c5c30e94a17ec87eb8dd51ff5221fed9

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
packages: ${{ steps.filter.outputs.changed_packages }}
2929
has_changes: ${{ steps.filter.outputs.changed_packages != '[]' }}
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
- uses: ./.github/actions/changes
3333
id: filter
3434

@@ -44,7 +44,7 @@ jobs:
4444
target: ["html", "io"]
4545

4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
- uses: subosito/flutter-action@v2
4949
with:
5050
channel: "stable"

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,55 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2023-09-07
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- There are no breaking changes in this release.
15+
16+
Packages with other changes:
17+
18+
- [`firebase_ui_auth` - `v1.8.0`](#firebase_ui_auth---v180)
19+
- [`firebase_ui_localizations` - `v1.6.1`](#firebase_ui_localizations---v161)
20+
- [`firebase_ui_oauth` - `v1.4.11`](#firebase_ui_oauth---v1411)
21+
- [`firebase_ui_oauth_facebook` - `v1.2.11`](#firebase_ui_oauth_facebook---v1211)
22+
- [`firebase_ui_oauth_twitter` - `v1.2.11`](#firebase_ui_oauth_twitter---v1211)
23+
- [`firebase_ui_oauth_apple` - `v1.2.11`](#firebase_ui_oauth_apple---v1211)
24+
- [`firebase_ui_oauth_google` - `v1.2.11`](#firebase_ui_oauth_google---v1211)
25+
- [`firebase_ui_firestore` - `v1.5.11`](#firebase_ui_firestore---v1511)
26+
- [`firebase_ui_database` - `v1.3.9`](#firebase_ui_database---v139)
27+
- [`firebase_ui_storage` - `v1.0.1`](#firebase_ui_storage---v101)
28+
29+
Packages with dependency updates only:
30+
31+
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
32+
33+
- `firebase_ui_oauth` - `v1.4.11`
34+
- `firebase_ui_oauth_facebook` - `v1.2.11`
35+
- `firebase_ui_oauth_twitter` - `v1.2.11`
36+
- `firebase_ui_oauth_apple` - `v1.2.11`
37+
- `firebase_ui_oauth_google` - `v1.2.11`
38+
- `firebase_ui_firestore` - `v1.5.11`
39+
- `firebase_ui_database` - `v1.3.9`
40+
- `firebase_ui_storage` - `v1.0.1`
41+
42+
---
43+
44+
#### `firebase_ui_auth` - `v1.8.0`
45+
46+
- **FIX**(ui_auth,ui_localizations): add invalid verification SMS code error label ([#102](https://github.com/firebase/FirebaseUI-Flutter/issues/102)). ([8adc39b9](https://github.com/firebase/FirebaseUI-Flutter/commit/8adc39b94abcf55a4fc0c07850e7e9ec25380d0d))
47+
- **FIX**(ui_auth): allow to pass EmailFormStyle via property ([#98](https://github.com/firebase/FirebaseUI-Flutter/issues/98)). ([88c31a33](https://github.com/firebase/FirebaseUI-Flutter/commit/88c31a332dc490d5500e81d491ba929b0fe4c5f0))
48+
- **FEAT**(ui_auth): allow to toggle password visibility ([#104](https://github.com/firebase/FirebaseUI-Flutter/issues/104)). ([6e3735d9](https://github.com/firebase/FirebaseUI-Flutter/commit/6e3735d9fda3f2415a781ff591a5842864dc2fcf))
49+
50+
#### `firebase_ui_localizations` - `v1.6.1`
51+
52+
- **FIX**(ui_auth,ui_localizations): add invalid verification SMS code error label ([#102](https://github.com/firebase/FirebaseUI-Flutter/issues/102)). ([8adc39b9](https://github.com/firebase/FirebaseUI-Flutter/commit/8adc39b94abcf55a4fc0c07850e7e9ec25380d0d))
53+
54+
655
## 2023-09-01
756

857
### Changes

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Firebase UI is a set of plugins for Flutter that allows you to quickly connect c
1515
| [`firebase_ui_oauth_facebook`](./packages/firebase_ui_oauth_facebook/) | [![pub package](https://img.shields.io/pub/v/firebase_ui_oauth_facebook.svg)](https://pub.dev/packages/firebase_ui_oauth_facebook) |
1616
| [`firebase_ui_oauth_google`](./packages/firebase_ui_oauth_google/) | [![pub package](https://img.shields.io/pub/v/firebase_ui_oauth_google.svg)](https://pub.dev/packages/firebase_ui_oauth_google) |
1717
| [`firebase_ui_oauth_twitter`](./packages/firebase_ui_oauth_twitter/) | [![pub package](https://img.shields.io/pub/v/firebase_ui_oauth_twitter.svg)](https://pub.dev/packages/firebase_ui_oauth_twitter) |
18-
| [`firebase_ui_shared`](./packages/firebase_ui_shared/) | [![pub package](https://img.shields.io/pub/v/firebase_ui_shared.svg)](https://pub.dev/packages/firebase_ui_shared) |
1918
| [`firebase_ui_storage`](./packages/firebase_ui_storage/) | [![pub package](https://img.shields.io/pub/v/firebase_ui_storage.svg)](https://pub.dev/packages/firebase_ui_storage) |
2019

2120
## Issues

packages/firebase_ui_auth/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.8.0
2+
3+
- **FIX**(ui_auth,ui_localizations): add invalid verification SMS code error label ([#102](https://github.com/firebase/FirebaseUI-Flutter/issues/102)). ([8adc39b9](https://github.com/firebase/FirebaseUI-Flutter/commit/8adc39b94abcf55a4fc0c07850e7e9ec25380d0d))
4+
- **FIX**(ui_auth): allow to pass EmailFormStyle via property ([#98](https://github.com/firebase/FirebaseUI-Flutter/issues/98)). ([88c31a33](https://github.com/firebase/FirebaseUI-Flutter/commit/88c31a332dc490d5500e81d491ba929b0fe4c5f0))
5+
- **FEAT**(ui_auth): allow to toggle password visibility ([#104](https://github.com/firebase/FirebaseUI-Flutter/issues/104)). ([6e3735d9](https://github.com/firebase/FirebaseUI-Flutter/commit/6e3735d9fda3f2415a781ff591a5842864dc2fcf))
6+
17
## 1.7.0
28

39
- **FIX**(ui_localizations,ui_auth): add missing labels ([#87](https://github.com/firebase/FirebaseUI-Flutter/issues/87)). ([be2b0c33](https://github.com/firebase/FirebaseUI-Flutter/commit/be2b0c33f9537f307c2cae97e5f483f695b3ea05))

packages/firebase_ui_auth/doc/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,34 @@ Future<void> main() async {
4242

4343
## macOS entitlements
4444

45-
If you're building for macOS, make sure to add necessary entitlements. Learn more [from the official Flutter documentation](https://docs.flutter.dev/development/platform-integration/macos/building).
45+
If you're building for macOS, make sure to add necessary entitlements. Learn more [from the official Flutter documentation](https://docs.flutter.dev/platform-integration/macos/building#setting-up-entitlements).
46+
47+
## Writing widget unit tests
48+
49+
If you're writing widget unit tests, you'll need to add the following to your `setUpAll` method:
50+
51+
```dart
52+
setUpAll(() {
53+
setFirebaseUiIsTestMode(true);
54+
});
55+
```
56+
57+
Also, you will likely want to mock the `FirebaseAuth` instance:
58+
59+
```dart
60+
class MockFirebaseAuth extends Mock implements FirebaseAuth {
61+
/// mock necessary methods
62+
}
63+
```
64+
65+
An instance of `MockFirebaseAuth` can then be passed to Firebase UI widgets:
66+
67+
```dart
68+
SignInScreen(
69+
auth: MockFirebaseAuth(),
70+
/// ... other props
71+
)
72+
```
4673

4774
## Next steps
4875

packages/firebase_ui_auth/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}

packages/firebase_ui_auth/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

packages/firebase_ui_auth/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -156,7 +156,7 @@
156156
97C146E61CF9000F007C117D /* Project object */ = {
157157
isa = PBXProject;
158158
attributes = {
159-
LastUpgradeCheck = 1300;
159+
LastUpgradeCheck = 1430;
160160
ORGANIZATIONNAME = "";
161161
TargetAttributes = {
162162
97C146ED1CF9000F007C117D = {
@@ -200,10 +200,12 @@
200200
/* Begin PBXShellScriptBuildPhase section */
201201
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202202
isa = PBXShellScriptBuildPhase;
203+
alwaysOutOfDate = 1;
203204
buildActionMask = 2147483647;
204205
files = (
205206
);
206207
inputPaths = (
208+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
207209
);
208210
name = "Thin Binary";
209211
outputPaths = (
@@ -253,6 +255,7 @@
253255
};
254256
9740EEB61CF901F6004384FC /* Run Script */ = {
255257
isa = PBXShellScriptBuildPhase;
258+
alwaysOutOfDate = 1;
256259
buildActionMask = 2147483647;
257260
files = (
258261
);

packages/firebase_ui_auth/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/firebase_ui_auth/example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,7 @@
4545
<false/>
4646
<key>CADisableMinimumFrameDurationOnPhone</key>
4747
<true/>
48+
<key>UIApplicationSupportsIndirectInputEvents</key>
49+
<true/>
4850
</dict>
4951
</plist>

packages/firebase_ui_auth/example/lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ class FirebaseAuthUIExample extends StatelessWidget {
267267
showMFATile: kIsWeb ||
268268
platform == TargetPlatform.iOS ||
269269
platform == TargetPlatform.android,
270+
showUnlinkConfirmationDialog: true,
270271
);
271272
},
272273
},

packages/firebase_ui_auth/example/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
isa = PBXProject;
203203
attributes = {
204204
LastSwiftUpdateCheck = 0920;
205-
LastUpgradeCheck = 1300;
205+
LastUpgradeCheck = 1430;
206206
ORGANIZATIONNAME = "";
207207
TargetAttributes = {
208208
33CC10EC2044A3C60003C045 = {

packages/firebase_ui_auth/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1300"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

packages/firebase_ui_auth/example/pubspec.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ environment:
2222

2323
dependencies:
2424
cupertino_icons: ^1.0.2
25-
firebase_auth: ^4.7.2
26-
firebase_core: ^2.15.0
25+
firebase_auth: ^4.9.0
26+
firebase_core: ^2.15.1
2727
flutter:
2828
sdk: flutter
2929
flutter_localizations:
3030
sdk: flutter
31-
firebase_ui_auth: ^1.7.0
32-
firebase_ui_localizations: ^1.6.0
33-
firebase_ui_oauth: ^1.4.10
34-
firebase_ui_oauth_apple: ^1.2.10
35-
firebase_ui_oauth_facebook: ^1.2.10
36-
firebase_ui_oauth_google: ^1.2.10
37-
firebase_ui_oauth_twitter: ^1.2.10
31+
firebase_ui_auth: ^1.8.0
32+
firebase_ui_localizations: ^1.6.1
33+
firebase_ui_oauth: ^1.4.11
34+
firebase_ui_oauth_apple: ^1.2.11
35+
firebase_ui_oauth_facebook: ^1.2.11
36+
firebase_ui_oauth_google: ^1.2.11
37+
firebase_ui_oauth_twitter: ^1.2.11
3838
dev_dependencies:
3939
drive: ^1.0.0-1.0.nullsafety.1
4040
firebase_ui_shared: ^1.3.0

packages/firebase_ui_auth/example/windows/flutter/generated_plugin_registrant.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
#include "generated_plugin_registrant.h"
88

99
#include <desktop_webview_auth/desktop_webview_auth_plugin.h>
10+
#include <firebase_auth/firebase_auth_plugin_c_api.h>
1011
#include <firebase_core/firebase_core_plugin_c_api.h>
1112
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
1213

1314
void RegisterPlugins(flutter::PluginRegistry* registry) {
1415
DesktopWebviewAuthPluginRegisterWithRegistrar(
1516
registry->GetRegistrarForPlugin("DesktopWebviewAuthPlugin"));
17+
FirebaseAuthPluginCApiRegisterWithRegistrar(
18+
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
1619
FirebaseCorePluginCApiRegisterWithRegistrar(
1720
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
1821
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(

packages/firebase_ui_auth/example/windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
list(APPEND FLUTTER_PLUGIN_LIST
66
desktop_webview_auth
7+
firebase_auth
78
firebase_core
89
flutter_secure_storage_windows
910
)

packages/firebase_ui_auth/lib/firebase_ui_auth.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ export 'src/widgets/sign_out_button.dart';
9595
export 'src/widgets/sms_code_input.dart' show SMSCodeInputState, SMSCodeInput;
9696
export 'src/widgets/user_avatar.dart';
9797

98+
bool _isTestMode = false;
99+
100+
@visibleForTesting
101+
void setFirebaseUiIsTestMode(bool isTestMode) {
102+
_isTestMode = isTestMode;
103+
}
104+
98105
class FirebaseUIAuth {
99106
static final _providers = <FirebaseApp, List<AuthProvider>>{};
100107
static final _configuredApps = <FirebaseApp, bool>{};
@@ -104,14 +111,15 @@ class FirebaseUIAuth {
104111
}
105112

106113
static bool isAppConfigured(FirebaseApp app) {
114+
if (_isTestMode) return true;
107115
return _providers.containsKey(app);
108116
}
109117

110118
static void configureProviders(
111119
List<AuthProvider> configs, {
112120
FirebaseApp? app,
113121
}) {
114-
if (Firebase.apps.isEmpty) {
122+
if (!_isTestMode && Firebase.apps.isEmpty) {
115123
throw Exception(
116124
'You must call Firebase.initializeApp() '
117125
'before calling configureProviders()',

0 commit comments

Comments
 (0)