You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[google_sign_in] Support For macOS Desktop app #46157
The GoogleSignIn SDK this plugin wraps isn't available for desktop, so it may not be possible to implement the same API. The API surface will need to be evaluated against a supported option like AppAuth to determine whether desktop support should be a separate plugin instead.
@arctouch-felipefontes macOS desktop development is very foreign to me, so I'm going to trust @stuartmorgan's judgement in this one (and you should too!) :)
(I looked at AppAuth and it looks promising. Maybe you can try to implement a version of google_sign_in for Mac using AppAuth on a separate package, just like we did with the web version?)
I'm sorry I didn't mean to be disrespectful. I've just think i can't contribute to the discussion because i have never did a hello world on a macOS app and also have no idea how google_sign_in is implemented. I just use it. :)
Like @ditman said.
For google sign in web. we have the google_sign_in_web package.
could we have the google_sign_in_mac package?
this way he would be able to implement the interface on the core package right?
Yes, that is the idea. If anybody creates a google_sign_in_mac (or an arctouch_google_sign_in_mac package 😉) that follows the google_sign_in_platform_interface API, then everybody could use it on their existing apps just by depending on it (similarly to how you both depend on google_sign_in and google_sign_in_web).
In the future we want to make that dependency automatic depending on the platforms your app targets, but for now it needs to be explicit.
this way he would be able to implement the interface on the core package right?
You don't need to put the mac implementation in the core package at all, it can be any package on pub.dev (or github)
I think the problem that @stuartmorgan is highlighting is that the current google_sign_in_platform_interface API may not be well suited for a macOS version (that can't use the GoogleSignIn API directly, and needs to go through the AppAuth route)
My english is not that good. i mean use the core interface to implement in the platform specific plugin.
About arctouch_google_sign_in_mac I would love to learn and try to do it. but i'm actually doing the web version of an app using bloc that already exists only changing the UI but i'm having some difficulties with perfomance for flutter web, specially for ListView.separated scroll. so i had the idea to switch to mac app. but in order to convince my team at arctouch. I need the login. and I have a very close deadline for the flutter web version. so I can't stop wha't i'm doing to do this. If I find some time in the weekends i will try to.
This is my first time engaging on an open source discussion. i don't know if I'm doing correctly.
I Actually have a plugin that it's finished and don't find the time to do the Readme and publish it. Flutter is motivating me in ways I couldn't imagine.
For google sign in web. we have the google_sign_in_web package.
could we have the google_sign_in_mac package?
The issue here is that "Google Sign-In" is a specific API which supports mobile and web, but not desktop. Adding a macOS implementation of the plugin would therefore be fundamentally different from adding a web implementation.
It may be that the plugin's interface can be implemented via AppAuth, or there may be a fundamental mismatch that will require a completely separate auth plugin with its own API (not just a federated implementation package). That's what needs to be evaluated, per my comment above. If the former is possible that's definitely the preferred outcome.
This will require using a version of Flutter master that's from yesterday or later.
I haven't done a working end-to-end test yet since my initial attempt to integrate it into a test application ran into Keychain error exceptions, but it's likely that's an issue with the app's setup rather than the plugin. Feedback welcome if anyone does give it a try before I have time to return to debugging the app I was trying it in.
I've validated this in an example project; it appears to require the Keychain Sharing Group change described in this issue (which is about iOS, but I saw the same thing with macOS, and resolved it by adding that sharing group).
Reacted by mono — Masayuki Ono, Cương Nguyễn, Aryan Chaurasia and Woojong Koh
Reacted by Cương Nguyễn
Reacted by Cương Nguyễn, Nimr 🇵🇸, Aryan Chaurasia and David Iglesias
Reacted by Cương Nguyễn, Chi-I Huang and Aryan Chaurasia
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
stuartmorgan-g commentedon Dec 5, 2019
The GoogleSignIn SDK this plugin wraps isn't available for desktop, so it may not be possible to implement the same API. The API surface will need to be evaluated against a supported option like AppAuth to determine whether desktop support should be a separate plugin instead.
arctouch-felipefontes commentedon Dec 6, 2019
@ditman can you help with this one two?
ditman commentedon Dec 6, 2019
@arctouch-felipefontes macOS desktop development is very foreign to me, so I'm going to trust @stuartmorgan's judgement in this one (and you should too!) :)
(I looked at AppAuth and it looks promising. Maybe you can try to implement a version of google_sign_in for Mac using AppAuth on a separate package, just like we did with the web version?)
arctouch-felipefontes commentedon Dec 6, 2019
I'm sorry I didn't mean to be disrespectful. I've just think i can't contribute to the discussion because i have never did a hello world on a macOS app and also have no idea how google_sign_in is implemented. I just use it. :)
Like @ditman said.
For google sign in web. we have the google_sign_in_web package.
could we have the google_sign_in_mac package?
this way he would be able to implement the interface on the core package right?
ditman commentedon Dec 6, 2019
Yes, that is the idea. If anybody creates a
google_sign_in_mac(or anarctouch_google_sign_in_macpackage 😉) that follows thegoogle_sign_in_platform_interfaceAPI, then everybody could use it on their existing apps just by depending on it (similarly to how you both depend ongoogle_sign_inandgoogle_sign_in_web).In the future we want to make that dependency automatic depending on the platforms your app targets, but for now it needs to be explicit.
You don't need to put the mac implementation in the core package at all, it can be any package on pub.dev (or github)
ditman commentedon Dec 6, 2019
I think the problem that @stuartmorgan is highlighting is that the current
google_sign_in_platform_interfaceAPI may not be well suited for a macOS version (that can't use the GoogleSignIn API directly, and needs to go through the AppAuth route)arctouch-felipefontes commentedon Dec 6, 2019
My english is not that good. i mean use the core interface to implement in the platform specific plugin.
About arctouch_google_sign_in_mac I would love to learn and try to do it. but i'm actually doing the web version of an app using bloc that already exists only changing the UI but i'm having some difficulties with perfomance for flutter web, specially for ListView.separated scroll. so i had the idea to switch to mac app. but in order to convince my team at arctouch. I need the login. and I have a very close deadline for the flutter web version. so I can't stop wha't i'm doing to do this. If I find some time in the weekends i will try to.
This is my first time engaging on an open source discussion. i don't know if I'm doing correctly.
I Actually have a plugin that it's finished and don't find the time to do the Readme and publish it. Flutter is motivating me in ways I couldn't imagine.
stuartmorgan-g commentedon Dec 6, 2019
The issue here is that "Google Sign-In" is a specific API which supports mobile and web, but not desktop. Adding a macOS implementation of the plugin would therefore be fundamentally different from adding a web implementation.
It may be that the plugin's interface can be implemented via AppAuth, or there may be a fundamental mismatch that will require a completely separate auth plugin with its own API (not just a federated implementation package). That's what needs to be evaluated, per my comment above. If the former is possible that's definitely the preferred outcome.
felixwortmann commentedon Mar 22, 2021
43 remaining items
stuartmorgan-g commentedon Aug 16, 2023
I have a branch that adds macOS support; if anyone wants to try it out you can add the following to your pubspec.yaml:
This will require using a version of Flutter
masterthat's from yesterday or later.I haven't done a working end-to-end test yet since my initial attempt to integrate it into a test application ran into Keychain error exceptions, but it's likely that's an issue with the app's setup rather than the plugin. Feedback welcome if anyone does give it a try before I have time to return to debugging the app I was trying it in.I've validated this in an example project; it appears to require the Keychain Sharing Group change described in this issue (which is about iOS, but I saw the same thing with macOS, and resolved it by adding that sharing group).
[google_sign_in] Add macOS support (#4962)
[google_sign_in] Endorse macOS implementation (#5600)
ditman commentedon Dec 8, 2023
Wow, super requested feature! Congrats!
github-actions commentedon Dec 22, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[google_sign_in] Endorse macOS implementation (flutter#5600)
[google_sign_in] Endorse macOS implementation (flutter#5600)