1
I need help changing the Firebaseui login template in Angular to English.
Content from: user-signin.component.ts
import { AngularFireAuth } from '@angular/fire/auth';
import * as firebase from 'firebase/app';
import * as firebaseui from 'firebaseui';
@Component({
selector: 'app-user-signin',
templateUrl: './user-signin.component.html',
styleUrls: ['./user-signin.component.scss']
})
export class UserSigninComponent implements OnInit, OnDestroy {
constructor(public afAuth: AngularFireAuth, private router: Router) {}
ui: firebaseui.auth.AuthUI;
ngOnDestroy(): void {
this.ui.delete();
}
ngOnInit(): void {
// FirebaseUI config.
const uiConfig = {
signInSuccessUrl: '/home',
defaultConfig: {
// ...
resConfigs: 'pt_br', // And any other languages you support
defaultCountry: 'pt_br'
},
signInOptions: [
{
provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
recaptchaParameters: {
type: 'image', // 'audio'
size: 'normal', // 'invisible' or 'compact'
badge: 'bottomleft' //' bottomright' or 'inline' applies to invisible.
},
defaultCountry: 'BR'
},
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.EmailAuthProvider.PROVIDER_ID
],
tosUrl: '<your-tos-url>',
// Privacy policy url/callback.
privacyPolicyUrl: function() {
window.location.assign('<your-privacy-policy-url>');
}
};
this.ui = new firebaseui.auth.AuthUI(firebase.auth());
this.ui.start('#firebaseui-auth-container', uiConfig);
}
}
Contents of: user-signin.component.html
<div id="firebaseui-auth-container"></div>
I tried to follow these documentations but did not succeed: https://firebase.google.com/docs/auth/web/firebaseui#oauth_providers_google_facebook_twitter_and_github https://github.com/firebase/firebaseui-web/blob/master/LANGUAGES.md
I appreciate any suggestion.