Skip to content

Commit 0cedfc8

Browse files
feat(auth, windows): add Windows support to auth plugin (#11089)
* feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels END Auth * feat(auth): move to Pigeon for Platform channels START user * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat(auth): move to Pigeon for Platform channels * feat: start objc * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios * feat: ios done * feat: ios done * remove test code from demo * fix codes * fix codes * fix codes * feat: update web * feat: update tests * fix tests * add licence * fix analyze * fix analyze * fix pod projects * fix macos * fix macos * fix format * fix ci * remove useless file * fix ios crash * swift 5.6 * fix tests * fix tests * fix tests * fix tests * fix tests * fix ci * fix ci * fix android * fix format * fix format * XL runner?? * Update packages/firebase_auth/firebase_auth/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseMultiFactor.java Co-authored-by: Russell Wheatley <[email protected]> * Update packages/firebase_auth/firebase_auth/ios/Classes/FLTFirebaseAuthPlugin.m Co-authored-by: Russell Wheatley <[email protected]> * remove useless code and apply suggestions from review * remove useless code and apply suggestions from review * add windows example app * base project * add generated pigeon for windows * add generated pigeon for windows * change name for interfaces * update pigeon to 10.0.0 * import firebase in windows * reorder * reorder * signInAnonymously * sign in anonymously * sharing app instance * sharing instance * hardcoded anonymously signin * more functions * implement functions * last functions * idtoken listener * eventchannel * event channel * binaryMessenger * it works * formatting * linking * update windows * update windows version * URL * prepare CI * wrong error message * error codes * remove tests windows * formlat * feat: update pigeon * working on emulator :D * change tests * fix generation * format * working * auth * update tests * skipping tests * new version of the SDK * remove xl * format * update pigeon * format * test passed * change * ci * ci * ci * ci * ci * ci * ci * ci * ci * ci * ci * ci * ci * throwing on unimplements * format --------- Co-authored-by: Russell Wheatley <[email protected]>
1 parent 4e9bb69 commit 0cedfc8

Some content is hidden

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

52 files changed

+9424
-365
lines changed

.github/workflows/e2e_tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ jobs:
299299
timeout-minutes: 45
300300
steps:
301301
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
302+
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2
303+
with:
304+
distribution: 'temurin'
305+
java-version: '11'
302306
- uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8
303307
name: Install Node.js 16
304308
with:
@@ -316,9 +320,5 @@ jobs:
316320
- name: "Install Tools"
317321
run: |
318322
npm install -g firebase-tools
319-
- name: Start Firebase Emulator
320-
run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh
321-
- name: "E2E Tests"
322-
working-directory: tests
323-
run: |
324-
flutter test .\integration_test\e2e_test.dart -d windows
323+
- name: Start Firebase Emulator and run tests
324+
run: cd ./.github/workflows/scripts && firebase emulators:exec --project flutterfire-e2e-tests "cd ../../../tests && flutter test .\integration_test\e2e_test.dart -d windows"

packages/firebase_auth/firebase_auth/android/src/main/java/io/flutter/plugins/firebase/auth/GeneratedAndroidFirebaseAuth.java

Lines changed: 138 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
/*
2-
* Copyright 2023, the Chromium project authors. Please see the AUTHORS file
3-
* for details. All rights reserved. Use of this source code is governed by a
4-
* BSD-style license that can be found in the LICENSE file.
5-
*/
6-
7-
// Autogenerated from Pigeon (v10.1.6), do not edit directly.
1+
// Copyright 2023, the Chromium project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
// Autogenerated from Pigeon (v11.0.1), do not edit directly.
85
// See also: https://pub.dev/packages/pigeon
96

107
package io.flutter.plugins.firebase.auth;
@@ -411,81 +408,6 @@ ArrayList<Object> toList() {
411408
}
412409
}
413410

414-
/** Generated class from Pigeon that represents data sent in messages. */
415-
public static final class PigeonActionCodeInfo {
416-
private @NonNull ActionCodeInfoOperation operation;
417-
418-
public @NonNull ActionCodeInfoOperation getOperation() {
419-
return operation;
420-
}
421-
422-
public void setOperation(@NonNull ActionCodeInfoOperation setterArg) {
423-
if (setterArg == null) {
424-
throw new IllegalStateException("Nonnull field \"operation\" is null.");
425-
}
426-
this.operation = setterArg;
427-
}
428-
429-
private @NonNull PigeonActionCodeInfoData data;
430-
431-
public @NonNull PigeonActionCodeInfoData getData() {
432-
return data;
433-
}
434-
435-
public void setData(@NonNull PigeonActionCodeInfoData setterArg) {
436-
if (setterArg == null) {
437-
throw new IllegalStateException("Nonnull field \"data\" is null.");
438-
}
439-
this.data = setterArg;
440-
}
441-
442-
/** Constructor is non-public to enforce null safety; use Builder. */
443-
PigeonActionCodeInfo() {}
444-
445-
public static final class Builder {
446-
447-
private @Nullable ActionCodeInfoOperation operation;
448-
449-
public @NonNull Builder setOperation(@NonNull ActionCodeInfoOperation setterArg) {
450-
this.operation = setterArg;
451-
return this;
452-
}
453-
454-
private @Nullable PigeonActionCodeInfoData data;
455-
456-
public @NonNull Builder setData(@NonNull PigeonActionCodeInfoData setterArg) {
457-
this.data = setterArg;
458-
return this;
459-
}
460-
461-
public @NonNull PigeonActionCodeInfo build() {
462-
PigeonActionCodeInfo pigeonReturn = new PigeonActionCodeInfo();
463-
pigeonReturn.setOperation(operation);
464-
pigeonReturn.setData(data);
465-
return pigeonReturn;
466-
}
467-
}
468-
469-
@NonNull
470-
ArrayList<Object> toList() {
471-
ArrayList<Object> toListResult = new ArrayList<Object>(2);
472-
toListResult.add(operation == null ? null : operation.index);
473-
toListResult.add((data == null) ? null : data.toList());
474-
return toListResult;
475-
}
476-
477-
static @NonNull PigeonActionCodeInfo fromList(@NonNull ArrayList<Object> list) {
478-
PigeonActionCodeInfo pigeonResult = new PigeonActionCodeInfo();
479-
Object operation = list.get(0);
480-
pigeonResult.setOperation(
481-
operation == null ? null : ActionCodeInfoOperation.values()[(int) operation]);
482-
Object data = list.get(1);
483-
pigeonResult.setData(
484-
(data == null) ? null : PigeonActionCodeInfoData.fromList((ArrayList<Object>) data));
485-
return pigeonResult;
486-
}
487-
}
488-
489411
/** Generated class from Pigeon that represents data sent in messages. */
490412
public static final class PigeonActionCodeInfoData {
491413
private @Nullable String email;
@@ -551,93 +473,75 @@ ArrayList<Object> toList() {
551473
}
552474

553475
/** Generated class from Pigeon that represents data sent in messages. */
554-
public static final class PigeonUserCredential {
555-
private @Nullable PigeonUserDetails user;
476+
public static final class PigeonActionCodeInfo {
477+
private @NonNull ActionCodeInfoOperation operation;
556478

557-
public @Nullable PigeonUserDetails getUser() {
558-
return user;
479+
public @NonNull ActionCodeInfoOperation getOperation() {
480+
return operation;
559481
}
560482

561-
public void setUser(@Nullable PigeonUserDetails setterArg) {
562-
this.user = setterArg;
483+
public void setOperation(@NonNull ActionCodeInfoOperation setterArg) {
484+
if (setterArg == null) {
485+
throw new IllegalStateException("Nonnull field \"operation\" is null.");
486+
}
487+
this.operation = setterArg;
563488
}
564489

565-
private @Nullable PigeonAdditionalUserInfo additionalUserInfo;
566-
567-
public @Nullable PigeonAdditionalUserInfo getAdditionalUserInfo() {
568-
return additionalUserInfo;
569-
}
490+
private @NonNull PigeonActionCodeInfoData data;
570491

571-
public void setAdditionalUserInfo(@Nullable PigeonAdditionalUserInfo setterArg) {
572-
this.additionalUserInfo = setterArg;
492+
public @NonNull PigeonActionCodeInfoData getData() {
493+
return data;
573494
}
574495

575-
private @Nullable PigeonAuthCredential credential;
576-
577-
public @Nullable PigeonAuthCredential getCredential() {
578-
return credential;
496+
public void setData(@NonNull PigeonActionCodeInfoData setterArg) {
497+
if (setterArg == null) {
498+
throw new IllegalStateException("Nonnull field \"data\" is null.");
499+
}
500+
this.data = setterArg;
579501
}
580502

581-
public void setCredential(@Nullable PigeonAuthCredential setterArg) {
582-
this.credential = setterArg;
583-
}
503+
/** Constructor is non-public to enforce null safety; use Builder. */
504+
PigeonActionCodeInfo() {}
584505

585506
public static final class Builder {
586507

587-
private @Nullable PigeonUserDetails user;
588-
589-
public @NonNull Builder setUser(@Nullable PigeonUserDetails setterArg) {
590-
this.user = setterArg;
591-
return this;
592-
}
593-
594-
private @Nullable PigeonAdditionalUserInfo additionalUserInfo;
508+
private @Nullable ActionCodeInfoOperation operation;
595509

596-
public @NonNull Builder setAdditionalUserInfo(@Nullable PigeonAdditionalUserInfo setterArg) {
597-
this.additionalUserInfo = setterArg;
510+
public @NonNull Builder setOperation(@NonNull ActionCodeInfoOperation setterArg) {
511+
this.operation = setterArg;
598512
return this;
599513
}
600514

601-
private @Nullable PigeonAuthCredential credential;
515+
private @Nullable PigeonActionCodeInfoData data;
602516

603-
public @NonNull Builder setCredential(@Nullable PigeonAuthCredential setterArg) {
604-
this.credential = setterArg;
517+
public @NonNull Builder setData(@NonNull PigeonActionCodeInfoData setterArg) {
518+
this.data = setterArg;
605519
return this;
606520
}
607521

608-
public @NonNull PigeonUserCredential build() {
609-
PigeonUserCredential pigeonReturn = new PigeonUserCredential();
610-
pigeonReturn.setUser(user);
611-
pigeonReturn.setAdditionalUserInfo(additionalUserInfo);
612-
pigeonReturn.setCredential(credential);
522+
public @NonNull PigeonActionCodeInfo build() {
523+
PigeonActionCodeInfo pigeonReturn = new PigeonActionCodeInfo();
524+
pigeonReturn.setOperation(operation);
525+
pigeonReturn.setData(data);
613526
return pigeonReturn;
614527
}
615528
}
616529

617530
@NonNull
618531
ArrayList<Object> toList() {
619-
ArrayList<Object> toListResult = new ArrayList<Object>(3);
620-
toListResult.add((user == null) ? null : user.toList());
621-
toListResult.add((additionalUserInfo == null) ? null : additionalUserInfo.toList());
622-
toListResult.add((credential == null) ? null : credential.toList());
532+
ArrayList<Object> toListResult = new ArrayList<Object>(2);
533+
toListResult.add(operation == null ? null : operation.index);
534+
toListResult.add((data == null) ? null : data.toList());
623535
return toListResult;
624536
}
625537

626-
static @NonNull PigeonUserCredential fromList(@NonNull ArrayList<Object> list) {
627-
PigeonUserCredential pigeonResult = new PigeonUserCredential();
628-
Object user = list.get(0);
629-
pigeonResult.setUser(
630-
(user == null) ? null : PigeonUserDetails.fromList((ArrayList<Object>) user));
631-
Object additionalUserInfo = list.get(1);
632-
pigeonResult.setAdditionalUserInfo(
633-
(additionalUserInfo == null)
634-
? null
635-
: PigeonAdditionalUserInfo.fromList((ArrayList<Object>) additionalUserInfo));
636-
Object credential = list.get(2);
637-
pigeonResult.setCredential(
638-
(credential == null)
639-
? null
640-
: PigeonAuthCredential.fromList((ArrayList<Object>) credential));
538+
static @NonNull PigeonActionCodeInfo fromList(@NonNull ArrayList<Object> list) {
539+
PigeonActionCodeInfo pigeonResult = new PigeonActionCodeInfo();
540+
Object operation = list.get(0);
541+
pigeonResult.setOperation(ActionCodeInfoOperation.values()[(int) operation]);
542+
Object data = list.get(1);
543+
pigeonResult.setData(
544+
(data == null) ? null : PigeonActionCodeInfoData.fromList((ArrayList<Object>) data));
641545
return pigeonResult;
642546
}
643547
}
@@ -1266,6 +1170,98 @@ ArrayList<Object> toList() {
12661170
}
12671171
}
12681172

1173+
/** Generated class from Pigeon that represents data sent in messages. */
1174+
public static final class PigeonUserCredential {
1175+
private @Nullable PigeonUserDetails user;
1176+
1177+
public @Nullable PigeonUserDetails getUser() {
1178+
return user;
1179+
}
1180+
1181+
public void setUser(@Nullable PigeonUserDetails setterArg) {
1182+
this.user = setterArg;
1183+
}
1184+
1185+
private @Nullable PigeonAdditionalUserInfo additionalUserInfo;
1186+
1187+
public @Nullable PigeonAdditionalUserInfo getAdditionalUserInfo() {
1188+
return additionalUserInfo;
1189+
}
1190+
1191+
public void setAdditionalUserInfo(@Nullable PigeonAdditionalUserInfo setterArg) {
1192+
this.additionalUserInfo = setterArg;
1193+
}
1194+
1195+
private @Nullable PigeonAuthCredential credential;
1196+
1197+
public @Nullable PigeonAuthCredential getCredential() {
1198+
return credential;
1199+
}
1200+
1201+
public void setCredential(@Nullable PigeonAuthCredential setterArg) {
1202+
this.credential = setterArg;
1203+
}
1204+
1205+
public static final class Builder {
1206+
1207+
private @Nullable PigeonUserDetails user;
1208+
1209+
public @NonNull Builder setUser(@Nullable PigeonUserDetails setterArg) {
1210+
this.user = setterArg;
1211+
return this;
1212+
}
1213+
1214+
private @Nullable PigeonAdditionalUserInfo additionalUserInfo;
1215+
1216+
public @NonNull Builder setAdditionalUserInfo(@Nullable PigeonAdditionalUserInfo setterArg) {
1217+
this.additionalUserInfo = setterArg;
1218+
return this;
1219+
}
1220+
1221+
private @Nullable PigeonAuthCredential credential;
1222+
1223+
public @NonNull Builder setCredential(@Nullable PigeonAuthCredential setterArg) {
1224+
this.credential = setterArg;
1225+
return this;
1226+
}
1227+
1228+
public @NonNull PigeonUserCredential build() {
1229+
PigeonUserCredential pigeonReturn = new PigeonUserCredential();
1230+
pigeonReturn.setUser(user);
1231+
pigeonReturn.setAdditionalUserInfo(additionalUserInfo);
1232+
pigeonReturn.setCredential(credential);
1233+
return pigeonReturn;
1234+
}
1235+
}
1236+
1237+
@NonNull
1238+
ArrayList<Object> toList() {
1239+
ArrayList<Object> toListResult = new ArrayList<Object>(3);
1240+
toListResult.add((user == null) ? null : user.toList());
1241+
toListResult.add((additionalUserInfo == null) ? null : additionalUserInfo.toList());
1242+
toListResult.add((credential == null) ? null : credential.toList());
1243+
return toListResult;
1244+
}
1245+
1246+
static @NonNull PigeonUserCredential fromList(@NonNull ArrayList<Object> list) {
1247+
PigeonUserCredential pigeonResult = new PigeonUserCredential();
1248+
Object user = list.get(0);
1249+
pigeonResult.setUser(
1250+
(user == null) ? null : PigeonUserDetails.fromList((ArrayList<Object>) user));
1251+
Object additionalUserInfo = list.get(1);
1252+
pigeonResult.setAdditionalUserInfo(
1253+
(additionalUserInfo == null)
1254+
? null
1255+
: PigeonAdditionalUserInfo.fromList((ArrayList<Object>) additionalUserInfo));
1256+
Object credential = list.get(2);
1257+
pigeonResult.setCredential(
1258+
(credential == null)
1259+
? null
1260+
: PigeonAuthCredential.fromList((ArrayList<Object>) credential));
1261+
return pigeonResult;
1262+
}
1263+
}
1264+
12691265
/** Generated class from Pigeon that represents data sent in messages. */
12701266
public static final class PigeonActionCodeSettings {
12711267
private @NonNull String url;
@@ -4487,7 +4483,7 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) {
44874483
*/
44884484
public interface GenerateInterfaces {
44894485

4490-
void generateInterfaces(@NonNull PigeonMultiFactorInfo info);
4486+
void pigeonInterface(@NonNull PigeonMultiFactorInfo info);
44914487

44924488
/** The codec used by GenerateInterfaces. */
44934489
static @NonNull MessageCodec<Object> getCodec() {
@@ -4501,7 +4497,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable GenerateIn
45014497
BasicMessageChannel<Object> channel =
45024498
new BasicMessageChannel<>(
45034499
binaryMessenger,
4504-
"dev.flutter.pigeon.firebase_auth_platform_interface.GenerateInterfaces.generateInterfaces",
4500+
"dev.flutter.pigeon.firebase_auth_platform_interface.GenerateInterfaces.pigeonInterface",
45054501
getCodec());
45064502
if (api != null) {
45074503
channel.setMessageHandler(
@@ -4510,7 +4506,7 @@ static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable GenerateIn
45104506
ArrayList<Object> args = (ArrayList<Object>) message;
45114507
PigeonMultiFactorInfo infoArg = (PigeonMultiFactorInfo) args.get(0);
45124508
try {
4513-
api.generateInterfaces(infoArg);
4509+
api.pigeonInterface(infoArg);
45144510
wrapped.add(0, null);
45154511
} catch (Throwable exception) {
45164512
ArrayList<Object> wrappedError = wrapError(exception);

0 commit comments

Comments
 (0)