Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Create templates that include WASM and SSB as platforms. #238

Open
jspuij opened this issue Nov 20, 2020 · 6 comments
Open

Create templates that include WASM and SSB as platforms. #238

jspuij opened this issue Nov 20, 2020 · 6 comments

Comments

@jspuij
Copy link
Contributor

jspuij commented Nov 20, 2020

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.

@jspuij
Copy link
Contributor Author

jspuij commented Nov 20, 2020

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:

https://github.com/Kukks/Hara

@Kukks
Copy link
Contributor

Kukks commented Nov 20, 2020

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:

https://github.com/Kukks/Hara

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)

@jspuij
Copy link
Contributor Author

jspuij commented Nov 20, 2020

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 ;-)

@Kukks
Copy link
Contributor

Kukks commented Nov 20, 2020

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)

@jspuij
Copy link
Contributor Author

jspuij commented Nov 20, 2020

There is this for windows: https://github.com/takuya-takeuchi/WinBiometricDotNet. (2 years old though). It seems xamarin-fingerprint supports macOS.

@arivera12
Copy link

arivera12 commented Nov 20, 2020

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)

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants