Can Sync Support to Maui SecureStorage be Added, Please?

dg2k 1,376 Reputation points
2022-08-04T21:11:44.373+00:00

I can see a plea to @James Montemagno for sync SecureStorage to be added from as far back as over 3 years ago (then under Xamarin.Essentials, now Microsoft.Maui.Storage namespace), for example as posted here. As someone commented in that plea, I also find it real pain for implementation when it comes to using the async SecureStorage.

This is the case because most usage of SecureStorage shows up in a constructor, for example, database initialization where the encryption key is obtained as await SecureStorage.GetAsync("ciptherKey"). Since an instance constructor cannot be async, the workaround at best is not elegant when a sync version like SecureStorage.Get("ciptherKey") could save the day.

Could @James Montemagno please please please reconsider the inclusion of sync SecureStorage getter and setter for Maui?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,745 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful