Skip to content
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

feat(auth): move to Pigeon for Platform channels #10802

Merged
merged 79 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ce9e8cf
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 17, 2023
7e8b5f9
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
17ce2af
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
d8a4ab2
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
eb0d9bd
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
fb53ffc
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
5bb2b0c
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
10735d5
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
19f9125
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
187cf8d
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
5aa7dd2
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 20, 2023
5ceed08
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
cecb05c
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
77470c2
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
456c2f9
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
5c9fb61
feat(auth): move to Pigeon for Platform channels END Auth
Lyokone Apr 21, 2023
1855736
feat(auth): move to Pigeon for Platform channels START user
Lyokone Apr 21, 2023
fed08b6
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
27a99a2
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
a67334e
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
50a0493
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
ee79965
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 21, 2023
e606958
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 24, 2023
73cd3f2
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 24, 2023
e9663ce
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 24, 2023
277b3e8
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 24, 2023
861abd1
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 24, 2023
12ad2bd
feat(auth): move to Pigeon for Platform channels
Lyokone Apr 24, 2023
6d63edb
feat: start objc
Lyokone Apr 27, 2023
daf53c0
feat: ios
Lyokone May 2, 2023
332cb5a
feat: ios
Lyokone May 2, 2023
6e94847
feat: ios
Lyokone May 2, 2023
579d062
feat: ios
Lyokone May 2, 2023
55942ae
feat: ios
Lyokone May 3, 2023
1dfc864
feat: ios
Lyokone May 3, 2023
a0c5b7e
feat: ios
Lyokone May 3, 2023
4c875e6
feat: ios
Lyokone May 4, 2023
90aeae4
feat: ios
Lyokone May 4, 2023
3e0548f
feat: ios
Lyokone May 9, 2023
52d4488
feat: ios done
Lyokone May 9, 2023
bbc6df0
feat: ios done
Lyokone May 9, 2023
3c32439
merge master
Lyokone May 9, 2023
5e92bba
remove test code from demo
Lyokone May 9, 2023
c1c62a8
fix codes
Lyokone May 10, 2023
dab3992
fix codes
Lyokone May 10, 2023
15dbbcc
fix codes
Lyokone May 10, 2023
983dfe4
feat: update web
Lyokone May 11, 2023
fc4e6ac
feat: update tests
Lyokone May 11, 2023
d98fe76
Merge branch 'master' into feat/pigeon-auth
Lyokone May 15, 2023
c88de08
fix tests
Lyokone May 16, 2023
aff9125
Merge branch 'master' of https://github.com/firebase/flutterfire into…
Lyokone May 17, 2023
993073d
add licence
Lyokone May 17, 2023
616370e
fix analyze
Lyokone May 17, 2023
66af294
fix analyze
Lyokone May 17, 2023
76a88da
fix pod projects
Lyokone May 17, 2023
05c57ba
fix macos
Lyokone May 17, 2023
5fb6ff5
fix macos
Lyokone May 17, 2023
d43ea95
fix format
Lyokone May 17, 2023
a1fae45
fix ci
Lyokone May 17, 2023
0b72b60
remove useless file
Lyokone May 17, 2023
9aa06d6
fix ios crash
Lyokone May 17, 2023
8e0dded
swift 5.6
Lyokone May 17, 2023
7e239f1
fix tests
Lyokone May 22, 2023
c63cbed
fix tests
Lyokone May 22, 2023
2210890
fix tests
Lyokone May 22, 2023
4b460d9
fix tests
Lyokone May 22, 2023
2f8fd85
fix tests
Lyokone May 22, 2023
ae5dbad
fix ci
Lyokone May 22, 2023
7d2b1c9
fix ci
Lyokone May 22, 2023
719a21d
fix android
Lyokone May 23, 2023
1b5ed85
fix format
Lyokone May 23, 2023
a83fba5
fix format
Lyokone May 23, 2023
5311882
XL runner??
Lyokone May 23, 2023
785bc31
Merge branch 'master' of https://github.com/firebase/flutterfire into…
Lyokone May 23, 2023
02d7b5e
Update packages/firebase_auth/firebase_auth/android/src/main/java/io/…
Lyokone Jun 5, 2023
6b9d984
Update packages/firebase_auth/firebase_auth/ios/Classes/FLTFirebaseAu…
Lyokone Jun 5, 2023
887cc72
remove useless code and apply suggestions from review
Lyokone Jun 6, 2023
6894958
remove useless code and apply suggestions from review
Lyokone Jun 6, 2023
923811a
Merge remote-tracking branch 'origin/master' into feat/pigeon-auth
Lyokone Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:

jobs:
android:
runs-on: macos-13
runs-on: macos-13-xl
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason to upgrade to large runners? Seems in all other places we are using standard runner.

timeout-minutes: 45
strategy:
matrix:
Expand Down Expand Up @@ -171,9 +171,6 @@ jobs:
# Uncomment following line to have simulator logs printed out for debugging purposes.
# xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' &
flutter test integration_test/e2e_test.dart -d "$SIMULATOR" --dart-define=CI=true
FLUTTER_DRIVE_EXIT_CODE=$?
xcrun simctl shutdown "$SIMULATOR"
exit $FLUTTER_DRIVE_EXIT_CODE

macos:
runs-on: macos-13
Expand Down Expand Up @@ -288,7 +285,7 @@ jobs:
# workaround we can use the `flutter drive` command. Tracking issue:
# https://github.com/flutter/flutter/issues/66264
run: |
chromedriver --port=4444 &
chromedriver --port=4444 --trace-buffer-size=100000 &
flutter drive \
--verbose-system-logs \
-d web-server \
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/federated-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ with the Facebook App ID and Secret set.
}
```

Note: Firebase will not set the `User.emailVerified` property
Note: Firebase will not set the `User.isEmailVerified` property
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.emailVerified is deprecated but still available. It's changed to match Java and the isAnonymous

to `true` if your user logs in with Facebook. Should your user login using a provider that verifies email (e.g. Google sign-in) then this will be set to true.
For further information, see this [issue](https://github.com/firebase/flutterfire/issues/4612#issuecomment-782107867).

Expand Down
4 changes: 2 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ scripts:
melos run generate:pigeon:macos --no-select && \
melos run format --no-select
packageFilters:
file-exists: 'pigeons/messages.dart'
fileExists: 'pigeons/messages.dart'
description: Generate the pigeon messages for all the supported packages.

generate:pigeon:macos:
run: |
melos exec -- "sed -i '' 's;#import <Flutter/Flutter.h>;#if TARGET_OS_OSX\n#import <FlutterMacOS/FlutterMacOS.h>\n#else\n#import <Flutter/Flutter.h>\n#endif;g' ios/Classes/messages.g.m"
packageFilters:
file-exists: 'ios/Classes/messages.g.m'
fileExists: 'ios/Classes/messages.g.m'
description: Pigeon does not add the condition to import Flutter or FlutterMacOs. Add the condition

odm:test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

package io.flutter.plugins.firebase.auth;

import static io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin.parseFirebaseUser;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseAuth.AuthStateListener;
import com.google.firebase.auth.FirebaseUser;
Expand Down Expand Up @@ -45,7 +43,7 @@ public void onListen(Object arguments, EventSink events) {
if (user == null) {
event.put(Constants.USER, null);
} else {
event.put(Constants.USER, parseFirebaseUser(user));
event.put(Constants.USER, PigeonParser.parseFirebaseUser(user).toList());
Salakar marked this conversation as resolved.
Show resolved Hide resolved
}

events.success(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@

public class Constants {

// Base
public static final String TAG = "FLTFirebaseAuthPlugin";
public static final String ANDROID = "android";
public static final String IOS = "iOS";
public static final String MINIMUM_VERSION = "minimumVersion";
public static final String INSTALL_APP = "installApp";
public static final String PACKAGE_NAME = "packageName";
public static final String BUNDLE_ID = "bundleId";
public static final String APP_NAME = "appName";

// Providers
Expand All @@ -31,70 +23,23 @@ public class Constants {
// User
public static final String USER = "user";
public static final String EMAIL = "email";
public static final String NEW_EMAIL = "newEmail";
public static final String UID = "uid";
public static final String USERNAME = "username";
public static final String PASSWORD = "password";
public static final String NEW_PASSWORD = "newPassword";
public static final String PREVIOUS_EMAIL = "previousEmail";
public static final String EMAIL_VERIFIED = "emailVerified";
public static final String IS_ANONYMOUS = "isAnonymous";
public static final String IS_NEW_USER = "isNewUser";
public static final String METADATA = "metadata";
public static final String DISPLAY_NAME = "displayName";
public static final String PHONE_NUMBER = "phoneNumber";
public static final String PHOTO_URL = "photoURL";
public static final String PROFILE = "profile";
public static final String ADDITIONAL_USER_INFO = "additionalUserInfo";
public static final String CREATION_TIME = "creationTime";
public static final String LAST_SIGN_IN_TIME = "lastSignInTime";
public static final String TENANT_ID = "tenantId";

// Auth
public static final String PROVIDERS = "providers";
public static final String PROVIDER_ID = "providerId";
public static final String PROVIDER_DATA = "providerData";
public static final String AUTH_CREDENTIAL = "authCredential";
public static final String CREDENTIAL = "credential";
public static final String SECRET = "secret";
public static final String REFRESH_TOKEN = "refreshToken";
public static final String ID_TOKEN = "idToken";
public static final String TOKEN = "token";
public static final String ACCESS_TOKEN = "accessToken";
public static final String CODE = "code";
public static final String RAW_NONCE = "rawNonce";
public static final String EMAIL_LINK = "emailLink";
public static final String VERIFICATION_ID = "verificationId";
public static final String SMS_CODE = "smsCode";
public static final String URL = "url";
public static final String DYNAMIC_LINK_DOMAIN = "dynamicLinkDomain";
public static final String LANGUAGE_CODE = "languageCode";
public static final String CLAIMS = "claims";
public static final String TIMEOUT = "timeout";
public static final String AUTH_TIMESTAMP = "authTimestamp";
public static final String EXPIRATION_TIMESTAMP = "expirationTimestamp";
public static final String ISSUED_AT_TIMESTAMP = "issuedAtTimestamp";
public static final String SIGN_IN_METHOD = "signInMethod";
public static final String SIGN_IN_PROVIDER = "signInProvider";
public static final String SIGN_IN_PROVIDER_SCOPE = "scopes";
public static final String SIGN_IN_PROVIDER_CUSTOM_PARAMETERS = "customParameters";
public static final String SIGN_IN_SECOND_FACTOR = "signInSecondFactor";
public static final String FORCE_RESENDING_TOKEN = "forceResendingToken";
public static final String FORCE_REFRESH = "forceRefresh";
public static final String TOKEN_ONLY = "tokenOnly";
public static final String HANDLE_CODE_IN_APP = "handleCodeInApp";
public static final String ACTION_CODE_SETTINGS = "actionCodeSettings";
public static final String AUTO_RETRIEVED_SMS_CODE_FOR_TESTING = "autoRetrievedSmsCodeForTesting";
public static final String HOST = "host";
public static final String PORT = "port";
public static final String NAME = "name";
public static final String APP_VERIFICATION_DISABLED_FOR_TESTING =
"appVerificationDisabledForTesting";
public static final String FORCE_RECAPTCHA_FLOW = "forceRecaptchaFlow";

// MultiFactor
public static final String MULTI_FACTOR_HINTS = "multiFactorHints";
public static final String MULTI_FACTOR_SESSION_ID = "multiFactorSessionId";
public static final String MULTI_FACTOR_RESOLVER_ID = "multiFactorResolverId";
public static final String MULTI_FACTOR_INFO = "multiFactorInfo";
}