Skip to content

Conversation

Lyokone
Copy link
Contributor

@Lyokone Lyokone commented Jan 11, 2024

Description

Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.

Related Issues

#12027

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 marked this pull request as ready for review January 17, 2024 09:19
Comment on lines +155 to +156
Future<void> linkWithRedirect(AuthProvider provider) =>
auth_interop.linkWithRedirect(jsObject, provider.jsObject).toDart;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Future<void> linkWithRedirect(AuthProvider provider) =>
auth_interop.linkWithRedirect(jsObject, provider.jsObject).toDart;
Future<void> linkWithRedirect(AuthProvider provider) =>
auth_interop.linkWithRedirect(jsObject, provider.jsObject).toDart as Future<void>;

Is this correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When you run .toDart, it is interpreted as Future which includes Future so casting isn't necessary


/// If signed in, it refreshes the current user.
Future<void> reload() => handleThenable(jsObject.reload());
Future<void> reload() => jsObject.reload().toDart;
Copy link
Member

Choose a reason for hiding this comment

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

I see as Future<void> isn't needed on other API with this type so perhaps it isn't needed like the others returning a type as opposed to void.

@Lyokone Lyokone merged commit 8d2df7a into master Jan 17, 2024
@Lyokone Lyokone deleted the fat/migrate-auth-wasm branch January 17, 2024 13:11
if (e.name == 'FirebaseError') {
String code = e.code ?? '';
String message = e.message ?? '';
if (code.startsWith('auth/')) return false;
Copy link

Choose a reason for hiding this comment

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

Are these checks correct? In the previous version of this, the checks were

    if (code == null || !code.startsWith('auth/')) return false;
    if (message == null || !message.contains('Firebase')) return false;

Now it is inverted to return false if the message contains Firebase, which seems wrong?

@firebase firebase locked and limited conversation to collaborators Feb 17, 2024
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.

4 participants