I'm wondering once StandardMethodCodec is in place, if this library could use https://github.com/GoogleCloudPlatform/golang-samples to implement the Firebase plugins found at github.com/flutter/plugins ?
I did some research on this just last night. Here is how it looks to me.
There is official Go Admin SDK which implements mostly what I'm looking for with only caveat if using privileged authentication with service accounts (I suspect those samples you linked to are using this SDK).
If for your use case privileged auth is fine then you should be able to just use the SDK as is. For my use case I'm planning to distribute desktop client to users so it's not an option for me.
But. It should be possible to fork the Go SDK and add client authentication workflows similar to those in iOS and Android SDKs (I only need a few methods to support Google and email/password provider).
Looking at the source code all of the SDKs rely on the Google's identitykit SDK to implement auth and there is identitykit implementation for Go. So there doesn't seem to be any blockers at this point.
But that's just me after a couple of hours of research.
My use case is much the same as yours. I plan on using client sdk's for Go, and deploying them to desktop users. If they don't exist just yet, I may revert to using the cpp libs along with google/flutter-desktop-embedding.
I'm not a Firebase user but, from an embedded perspective, there is a lot of work to be done before having the correct Flutter Platform Channel implemented.
Ref Medium article on how the the Flutter's messaging works
@Drakirus
I'd actually be curious on what's missing on the golang side for unblocking development of plugins using StandardMethodCodec? I mean aside from the codec itself of course.
Update: I looked briefly at the embedder code and looks like it's a matter of implementing the codec and updating functions that handle messages in both directions. If I'm not missing something. Not a small chunk of work but should be fairly straightforward.
After comparing possible scope of effort between this project and the Google embedder to get a desktop client for my app I'm currently leaning towards using this one. So should be able to get a draft for standard message codec in coming week or two.
Also a nice opportunity to learn some Go.
I didn't wrap my head around the Message/Channels abstraction. But, the goal is to match the existing Flutter plugin API, and from what I have read we need (not entirely sure):
Implementing the StandardMethodCodec (Most used) in the first place, while keeping in mind the possibility to change the Codec in the future is the way to go!
(I wouldn't say it's "straightforward" but with a week of work, it's certainly doable :smiley:)
Also, at the moment the functions that handle the messages are hardcoded, those would need to be encapsulated (i.e.invokeMethod).
Having less and less time because of studies, I am always looking for more contributors, please let me know if you make any progress!
@pulyaevskiy Did you make some progress? I'd like to look into this issue as well but it would be sad if we duplicated work.
I'm working on this now.
Most helpful comment
I didn't wrap my head around the Message/Channels abstraction. But, the goal is to match the existing Flutter plugin API, and from what I have read we need (not entirely sure):
Implementing the
StandardMethodCodec(Most used) in the first place, while keeping in mind the possibility to change the Codec in the future is the way to go!(I wouldn't say it's "straightforward" but with a week of work, it's certainly doable :smiley:)
Also, at the moment the functions that handle the messages are hardcoded, those would need to be encapsulated (i.e.
invokeMethod).Having less and less time because of studies, I am always looking for more contributors, please let me know if you make any progress!