-
Notifications
You must be signed in to change notification settings - Fork 149
Create templates that include WASM and SSB as platforms. #238
Comments
I also want to acknowledge the work done by @Kukks as he has created a very nice template which can be cloned and used today: |
It was actually not too hard to do out of the box once #129 was done. The biggest hurdle is service implementation differences that need to be handled but that should probably be out of scope for a template. There's also the issue that I think many of the Xamarin.Essentials implementations do not support Mac or Windows. In some scenarios, implementing the WASM/Server version and embedding it in Electron might be easier (like with https://github.com/Daddoon/BlazorMobile) |
You are correct about the missing implementations in Xamarin Essentials sometimes. At least we will be supplying authentication and protected storage as APIs in MBB in the next version, that will work on Windows and macOS ;-) |
For example, to support biometric auth, I will be using WebAuthN on SSB and WASM and https://github.com/smstuebe/xamarin-fingerprint for Xamarin. This would leave WIndows and Mac out of the loop(even though WebauthN on a browser in windows hooks up to native apis) :/ I'm curious to see the authentication flow and if it would allow for custom flows to work that don't follow OAuth. For protected storage, in my template project, I'm currently using Xamarin.SecureStorage for Xamarin based solutions, and then on SSB I fall to using local storage + IDataProtectorProvider to encrypt. No solution for WASM yet afaik(.net5 probably solves this) |
There is this for windows: https://github.com/takuya-takeuchi/WinBiometricDotNet. (2 years old though). It seems xamarin-fingerprint supports macOS. |
SSB and WASM may use the same encryption technique, I use a custom encryption method with browser local storage and OFC xamarin secure storage when running on native device. Btw you may need to do interfaces to abstract from platform implementation and provided separated services for each platform as best practice as far I can see. |
Due to popular demand we should probably include WASM and SSB as platforms in some of the hybrid templates . I've read too many times that this would not be possible.
Unfortunately the Blazor templates are pretty complex with wasm/hosted and SSB variants and all auth options (which we would have to combine with our own Auth implementations). This might not be a trivial issue.
The text was updated successfully, but these errors were encountered: