2
0
mirror of synced 2025-01-28 15:15:28 +00:00
2017-11-23 17:29:40 +00:00

26 lines
532 B
JavaScript

/**
* @flow
* EmailAuthProvider representation wrapper
*/
import type { AuthCredential } from '../../../types';
const providerId = 'password';
export default class EmailAuthProvider {
constructor() {
throw new Error('`new EmailAuthProvider()` is not supported on the native Firebase SDKs.');
}
static get PROVIDER_ID(): string {
return providerId;
}
static credential(email: string, password: string): AuthCredential {
return {
token: email,
secret: password,
providerId,
};
}
}