-
-
Notifications
You must be signed in to change notification settings - Fork 50
[auth][android] resolve signOut return undefined #174 #175
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
Conversation
@NathanWalker Thanks |
The native signOut return type on android is void, adding async in front of it won't cast it to boolean. I think the best solution would be to add a |
Currently it is return true but it doesn’t work |
So we can register the plugin him self and resolve the promise! |
@mukaschultze I updated the code since android return void in order to capture the real signOut event. @NathanWalker @triniwiz What do you think about this way ? async signOut(): Promise<boolean> {
return new Promise((resolve, reject) => {
this.native?.signOut();
let timeout = setTimeout(() => {
reject(false);
}, 3000);
this.addAuthStateChangeListener((user) => {
clearTimeout(timeout);
console.log("User signed out", user);
if(user) {
reject(false);
}
resolve(true);
});
})
} |
@NathanWalker, @triniwiz .. any news aboutt this PR ! |
Sorry didn’t get time to review it but I’ll get to it soon
Sent from Yahoo Mail for iPhone
On Wednesday, March 8, 2023, 8:29 PM, kefahB ***@***.***> wrote:
@NathanWalker, @triniwiz .. any news aboutt this PR !
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @NathanWalker @triniwiz
this is a PR in case you agree about #174.