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

Conversation

Lyokone
Copy link
Contributor

@Lyokone Lyokone commented Apr 17, 2023

Description

Moving Auth to Pigeon to prepare for Windows C++ port.

Related Issues

Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@Lyokone Lyokone changed the title feat(auth): move to Pigeon for Platform channels feat(auth)!: move to Pigeon for Platform channels Apr 20, 2023
@@ -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

Lyokone and others added 2 commits June 5, 2023 09:13
…flutter/plugins/firebase/auth/FlutterFirebaseMultiFactor.java

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

Co-authored-by: Russell Wheatley <russellwheatley85@gmail.com>
@@ -34,6 +34,16 @@ Future<void> main() async {
await auth.useAuthEmulator('localhost', 9099);
}

// Setup
Copy link
Member

Choose a reason for hiding this comment

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

Should this still be here or is it from testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm removing this

Comment on lines 60 to 61
@"isAnonymous" : @NO,
@"isEmailVerified" : @YES,
Copy link
Member

Choose a reason for hiding this comment

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

Should these 2 BOOLs be hard-coded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In Provider Data, the email is always verified and the user is never anonymous. I'm adding a comment

Comment on lines 39 to 51
@Deprecated('Use isEmailVerified instead')
bool get emailVerified {
return _delegate.emailVerified;
return _delegate.isEmailVerified;
}

/// Returns whether the users email address has been verified.
///
/// To send a verification email, see [sendEmailVerification].
///
/// Once verified, call [reload] to ensure the latest user information is
/// retrieved from Firebase.
bool get isEmailVerified {
return _delegate.isEmailVerified;
Copy link
Member

Choose a reason for hiding this comment

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

Why are we changing this API? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To match the underlying API and the isAnonymous API (felt weird to have a is api and anoter one without it even if both API are returning a bool, I can do it in another PR)

@Lyokone Lyokone merged commit 43e5b20 into master Jul 10, 2023
16 of 18 checks passed
@Lyokone Lyokone deleted the feat/pigeon-auth branch July 10, 2023 13:21
@@ -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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants