bizz84 / bizz84/coding-with-flutter-login-demo

When upgrading to latest Auth

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
167
Forks
100
PR merge metrics
No merged PRs in 30d

Description

Greetings,

The latest auth package is 0.14.0+5.

This is required as some of the newer packages like storage is 3.0.6 requires a newer auth.

When you upgrade to that version of the auth package, the lines no longer work.
```

Future signInWithEmailAndPassword(String email, String password) async {
final FirebaseUser user = await _firebaseAuth.signInWithEmailAndPassword(email: email, password: password);

return user?.uid;
}

```

The _firebaseAuth.signIn... now returns a different type, of AuthResult.

So I changed the code to be, (as a guess)
```

Future signInWithEmailAndPassword(String email, String password) async {
final AuthResult auth = await _firebaseAuth.signInWithEmailAndPassword(email: email, password: password);
final FirebaseUser user = auth.user;
return user?.uid;
}

```

My new update actually doesn't log on and gets an error of casting from Null.

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the signInWithEmailAndPassword entry point shown in the issue and review the auth dependency upgrade from 0.14.0+5. Confirm how its return type is used in this login demo. Done means sign-in returns the expected user ID without the reported null-cast error.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, firebase, flutter
Domain
authentication, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.