Skip to content
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

fix: let sendOobCode return errors #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaxMonteil
Copy link

@MaxMonteil MaxMonteil commented Apr 5, 2021

Because of the void return in sendOobCode, errors are not propagated and cannot be caught and handles in the UI.

This happens when sending an oob code to reset a password on a non existing email.

import Auth from 'firebase-auth-lite';

const auth = new Auth({ apiKey });
auth.sendOobCode('PASSWORD_RESET', '[email protected]');

This change only removes the void keyword.

@GeKorm
Copy link

GeKorm commented Mar 10, 2022

This also fixes await auth.sendOobCode() since it returns a Promise instead of undefined @samuelgozi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants