firebase / firebase/firebase-tools-ui

user reload does not update emailVerified on emulator if emailVerified is updated manually.

Open
#1,074 7 comments 1 reaction 1 assignee Claimed by @aalej View on GitHub
Dominant language
TypeScript
Stars
291
Forks
74
PR merge metrics
No merged PRs in 30d

Description

### Operating System

macOS

### Browser Version

Safari 16.5.2

### Firebase SDK Version

10.7.1

### Firebase SDK Product:

Auth

### Describe your project's tooling

index.html with source tag. Just javascript.

### Describe the problem

emailVerified never returns true when using the emulator after a user.reload and the emailVerified is set to true manually from the console instead of using sendEmailVerification.

I mean to set the emailVerified to true here

image

after creating the user with email and password, instead of sending an email verification with code.

### Steps and code to reproduce issue

```
try {
const app = initializeApp(firebaseConfig);
var auth = getAuth();

connectAuthEmulator(auth, 'http://127.0.0.1:9099');

var uc = await createUserWithEmailAndPassword(auth, 'bla@bla.com', '123456');
//at this point, go to emulator console and manually set email to verified
//instead of sending email verification by code.
var user = uc.user;
setInterval(() => {
if (user?.emailVerified) {
console.log('email verified');
} else {
console.log('email not verified');
user?.reload();
}
}, 0);
} catch (e) {
console.error(e);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.