Skip to content

Commit

Permalink
feat(auth): move to Pigeon for Platform channels (#10802)
Browse files Browse the repository at this point in the history
* 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 <russellwheatley85@gmail.com>

* Update packages/firebase_auth/firebase_auth/ios/Classes/FLTFirebaseAuthPlugin.m

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>

* remove useless code and apply suggestions from review

* remove useless code and apply suggestions from review

---------

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
  • Loading branch information
Lyokone and russellwheatley committed Jul 10, 2023
1 parent 6f4d352 commit 43e5b20
Show file tree
Hide file tree
Showing 85 changed files with 14,514 additions and 7,630 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/e2e_tests.yaml
Expand Up @@ -26,7 +26,7 @@ on:

jobs:
android:
runs-on: macos-13
runs-on: macos-13-xl
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
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
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
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
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());
}

events.success(event);
Expand Down
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";
}

0 comments on commit 43e5b20

Please sign in to comment.