Files
react-native-firebase/lib/modules/auth/providers/EmailAuthProvider.js
2017-11-17 14:22:46 +00:00

24 lines
477 B
JavaScript

/**
* @flow
* EmailAuthProvider representation wrapper
*/
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,
};
}
}