firebase-auth-lite
firebase-auth-lite copied to clipboard
fix: let `sendOobCode` return errors
trafficstars
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.
This also fixes await auth.sendOobCode() since it returns a Promise instead of undefined @samuelgozi