AngularFireAuthStub |
Type : object
|
Default value : {
authState: fakeAuthState,
user: fakeAuthState,
auth: {
createUserWithEmailAndPassword: jasmine
.createSpy('createUserWithEmailAndPassword')
.and
.callFake(mockSignInHandler),
signInWithEmailAndPassword: jasmine
.createSpy('signInWithEmailAndPassword')
.and
.callFake(mockSignInHandler),
signOut: jasmine
.createSpy('signOut')
.and
.callFake(mockSignOutHandler),
},
}
|
credentialsMock |
Type : object
|
Default value : {
email: 'abc@123.com',
password: 'password'
}
|
fakeAuthState |
Default value : new BehaviorSubject(null)
|
FirestoreStub |
Type : object
|
Default value : {
collection: (name: string) => ({
doc: (_id: string) => ({
valueChanges: () => new BehaviorSubject({foo: 'bar'}),
set: (_d: any) => new Promise((resolve, _reject) => resolve()),
}),
}),
}
|
mockSignInHandler |
Default value : (email: any, password: any): Promise<any> => {
fakeAuthState.next(userMock);
return Promise.resolve(userMock);
}
|
mockSignOutHandler |
Default value : (): Promise<any> => {
fakeAuthState.next(null);
return Promise.resolve();
}
|
userMock |
Type : object
|
Default value : {
uid: 'ABC123',
email: credentialsMock.email,
}
|
collections |
Type : object
|
Default value : {
users: 'users',
}
|
confirmPasswordValidator |
Type : ValidatorFn
|
Default value : (control: AbstractControl): ValidationErrors | null => {
if (!control.parent || !control) {
return null;
}
const password = control.parent.get('password');
const passwordConfirm = control.parent.get('passwordConfirm');
if (!password || !passwordConfirm) {
return null;
}
if (passwordConfirm.value === '') {
return null;
}
if (password.value === passwordConfirm.value) {
return null;
}
return {passwordsNotMatching: true};
}
|
defaultAuthFirebaseUIConfig |
Type : NgxAuthFirebaseUIConfig
|
Default value : {
// authMethod: 'redirect',
// authProviders: [new GoogleAuthProvider(), new FacebookAuthProvider(), new TwitterAuthProvider(), new GithubAuthProvider()],
enableFirestoreSync: true,
toastMessageOnAuthSuccess: true,
toastMessageOnAuthError: true,
authGuardFallbackURL: '/',
authGuardLoggedInURL: '/',
// Password length min/max in forms independently of each componenet min/max.
// `min/max` input parameters in components should be within this range.
passwordMaxLength: 60,
passwordMinLength: 8,
// Same as password but for the name
nameMaxLength: 50,
nameMinLength: 2,
// If set, sign-in/up form is not available until email has been verified.
// Plus protected routes are still protected even though user is connected.
guardProtectedRoutesUntilEmailIsVerified: true,
// Default to email verification on
enableEmailVerification: true
}
|
defaultTranslations |
Type : object
|
Default value : {
verifyEmailTitleText: 'Confirm your e-mail address!',
verifyEmailConfirmationText: 'A confirmation e-mail has been sent. Check your inbox and click on the link "Confirm my e-mail" to confirm your e-mail address.',
verifyEmailGoBackText: 'Go back',
sendNewVerificationEmailText: 'Send new confirmation e-mail',
signOutText: 'Sign out',
messageOnEmailConfirmationSuccess: 'A new confirmation e-mail has been sent. Please check your inbox.',
}
|
PHONE_NUMBER_REGEX |
Default value : new RegExp(['^[+]{0,1}[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\.]{0,1}[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]{4,12}$'].join(''))
|
facebookAuthProvider |
Default value : new firebase.auth.FacebookAuthProvider()
|
githubAuthProvider |
Default value : new firebase.auth.GithubAuthProvider()
|
googleAuthProvider |
Default value : new firebase.auth.GoogleAuthProvider()
|
microsoftAuthProvider |
Default value : new firebase.auth.OAuthProvider('microsoft.com')
|
twitterAuthProvider |
Default value : new firebase.auth.TwitterAuthProvider()
|
yahooAuthProvider |
Default value : new firebase.auth.OAuthProvider('yahoo.com')
|
NgxAuthFirebaseUIConfigToken |
Default value : new InjectionToken<NgxAuthFirebaseUIConfig>('NgxAuthFirebaseUIConfigToken')
|
UserProvidedConfigToken |
Default value : new InjectionToken<NgxAuthFirebaseUIConfig>('UserProvidedConfigToken')
|