Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get oobCode for localization purpose

Firebase allows only one language for confirmations emails. Whole nicely done products are useless for multi-language apps. I want to make my own confirmation system. The only question is how can I get this oobCode which is generated inside firebase. site.com?mode=&oobCode=

Thank you.

like image 832
saintPeter Avatar asked Jan 06 '17 22:01

saintPeter


People also ask

How to get the oobcode from email verification?

The link in the "email verification" email contains the oobCodeas a query string parameter. There is actually no way to generate this code via the Firebase Authentication API or via the Admin SDKs. So, you need to extract the code from the query string and call the REST API endpointwith this code.

How do I configure localization options in Microsoft localization?

Microsoft.Extensions.Localization.IStringLocalizerFactory The AddLocalization (IServiceCollection, Action<LocalizationOptions>) overload accepts a setupAction parameter of type Action<LocalizationOptions>. This allows you to configure localization options.

When should I proceed to the localizability step?

You should proceed to the localization step only after completing the Localizability review step to verify that the globalized application is ready for localization. An application that is ready for localization is separated into two conceptual blocks: a block that contains all user interface elements and a block that contains executable code.

How can I isolate localizable strings in my application?

For more information on hosting, see .NET Generic Host. The primary mechanism for isolating localizable strings is with resource files. A resource file is an XML file with the .resx file extension. Resource files are translated prior to the execution of the consuming application — in other words, they represent translated content at rest.


1 Answers

There is currently no way to generate a valid oobCode value through the Firebase Authentication API. It can only be sent in the (as you've said "non-translatable") email message.

But you can build your own email verification mechanism if you want, using your own confirmation code to verify email ownership. You'd:

  1. Generate a random, unguessable code on a server
  2. Send it to the user's email address and then
  3. When the user clicks the confirmation link, have your own end point on the same server that you call back to
  4. At this point you can use the Firebase Admin SDK to set the emailVerified property to true.

For an example of the last step, see: https://firebase.google.com/docs/auth/admin/manage-users#update_a_user

Thanks to @Nikhil in the comments: Alternatively you can roll your own verification altogether and use the Admin SDK to set emailVerified to true. See the Firebase documentation for an example of that.

like image 182
Frank van Puffelen Avatar answered Sep 20 '22 03:09

Frank van Puffelen