teamhanko / hanko

Authentication and user management for the passkey era.
https://hanko.io
Other
5.69k stars 797 forks source link

Golang / Flutter integration #114

Closed gedw99 closed 1 year ago

gedw99 commented 2 years ago

I build gui apps for web, desktop and mobile in golang using gioui. It’s like flutter but in golang.

I think it’s possible to build a package that works with Hanko if your interested.

It would be cool for the gioui community to have a hanko integration.

https://github.com/gioui/gio-x/tree/main/notify is an example of OS native calls. Same sort of thing for Passkey calls etc.

it should be possible to work out the right OS calls for iOS, android.

There is a webview for gio also which I guess is needed for desktop, unless there are Passkey api for desktop is we can tap into?

For web, a golang wasm can do it to call the sone js that then calls the correct Browser api.

Gioui works very well on mobile and desktop.

gedw99 commented 2 years ago

The same code can be used for flutter too . I write flutter plugins with golang. Works just fine.

FlxMgdnz commented 2 years ago

Thank you for bringing this up, @gedw99! We'd love to have an integration for Gio.

Native passkey (WebAuthn) APIs should already be available on Android and also Windows 10/11. iOS 16 will also ship a native API.

Flutter is something we'll dive into later this year, so any work into that direction is probably helpful there as well.

gedw99 commented 2 years ago

I need to research the native calls for mobile . No idea if they exist for desktop, as Passkey / webauthn seems to be mobile focused but I guess there are desktop native calls for macOS. No idea about Windoze. If you have sone pointers o speed me up that would be fab.

gedw99 commented 2 years ago

I mean links to the native API. Any code calling those API’s are always useful

FlxMgdnz commented 2 years ago

Some links we have collected over time:

Windows:

Android: https://developers.google.com/identity/fido/android/native-apps

Apple: https://developer.apple.com/documentation/authenticationservices/public-private_key_authentication/supporting_passkeys

gedw99 commented 2 years ago

thanks :) will dig in...

gedw99 commented 2 years ago

I am sorry about not having time to follow up on this. I really would love to get this done by time / life changes are making it impossible.

i really hope someone else picks this up and submits a initial PR

gedw99 commented 1 year ago

Hey @FlxMgdnz

any movements on this ? I have not had time to work on it. The links you added look good and just require a gioui integration but I am flooded with other stuff ..

At the moment I use a webview on different OS’s. Sure it works but clunky.

FlxMgdnz commented 1 year ago

Hey, we've kicked off development of mobile SDKs, but we're starting with iOS and Android. Flutter and React Native will follow. Current plan is to have all mobile SDKs ready until end of Q3.

gedw99 commented 1 year ago

thanks @FlxMgdnz for update

I was going to take a crack at https://github.com/gioui but ran out of time. Its supports web, mobile and desktop all in golang. similar to who flutter works actually.

hanko gioui code for working with gioui would go here: https://github.com/gioui/gio-x You can see good examples of the file explorer etc.

if you want to make a boundary and post on gioui group: https://gioui.org/doc/community

FlxMgdnz commented 1 year ago

Closing this for now. We'll revisit when we plan a Flutter SDK.