Setting auth.languageCode is impossible due to PromiseProxy.
See original GitHub issueThis issue comes from the PromiseProxy and the fact that languageCode is both a getter and setter.
Version info
Angular: “@angular/core”: “~10.1.4”, Firebase: “firebase”: “^7.19.1”, AngularFire: “@angular/fire”: “^6.0.2”,
How to reproduce these conditions
// Try to change AngularFIreAuth languageCode
this.fireAuth.languageCode = 'fr';
// This fails because "Type 'string' is not assignable to type 'Promise<string>'."
// This comes from the PromiseProxy and the fact that languageCode is both a getter and setter.
// Setting to a Promise doesn't have any effect.
this.fireAuth.languageCode = new Promise(() => 'fr');
Expected behavior
I should be able to change the languageCode of the auth Object, to send email action templates in the user’s language.
Actual behavior
The languageCode property doesn’t work with the PromiseProxy. All email action templates are sent with the default Firebase Console language setting.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to change the language of the message sent in Firebase ...
Use the languageCode property of Auth to specify a language for the user. Here is the entry for that in JS, but it's...
Read more >Auth interface - JavaScript API reference - Firebase - Google
The Auth instance's language code. This is a readable/writable property. When set to null, the default Firebase Console language setting is applied.
Read more >How can I use firebase's language code (myFirebase.auth ...
I am trying to use Firebase Authentication to verify the email address that is provided by the user during sign up.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
6.1.0-rc.2
now hasUSE_DEVICE_LANGUAGE
andLANGUAGE_CODE
DI tokens which allow configuration of the auth language.Fantastic!
As a current workaround, I use firebase directly, with a delay, to make sure the app is initialized by AngularFire first.