这是indexloc提供的服务,不要输入任何密码
Skip to content

getRedirectResult(auth) still returns a UserCredential with a NONnull user after signing in or signing out (no redirect operation was called) #5610

@koroman17

Description

@koroman17

First I sign in

const provider = new GoogleAuthProvider();
signInWithRedirect(auth, provider);

then I get a UserCredential with a NONnull user (of course)

const handleGetRedirectResult = async () => {
	try {
		const result = await getRedirectResult(auth);
		console.log(result);
	} catch (error) {
		console.log(error);
	}
};
handleGetRedirectResult()

then I run the same function again

handleGetRedirectResult()

I still get a UserCredential with a NONnull user @@

then I sign out

signOut(auth)

then I run the function again

handleGetRedirectResult()

I still get a UserCredential with a NONnull user again @@
I think firebase has saved the redirect data somewhere and hasn't deleted it after first getRedirectResult(auth) that when I run handleGetRedirectResult() again, it still returns a UserCredential with a NONnull user even that I have signed out

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions