Skip to content

[google_sign_in] Support For macOS Desktop app #46157

Closed
flutter/packages
#5600

Description

@arctouch-felipefontes
No description provided.

Activity

  1. stuartmorgan-g commented on Dec 5, 2019

    @stuartmorgan-g
    Contributor

    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.

  2. arctouch-felipefontes commented on Dec 6, 2019

    @arctouch-felipefontes
    Author

    @ditman can you help with this one two?

  3. ditman commented on Dec 6, 2019

    @ditman
    Member

    @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?)

  4. arctouch-felipefontes commented on Dec 6, 2019

    @arctouch-felipefontes
    Author

    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?

  5. ditman commented on Dec 6, 2019

    @ditman
    Member

    could we have the google_sign_in_mac package?

    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)

  6. ditman commented on Dec 6, 2019

    @ditman
    Member

    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)

  7. arctouch-felipefontes commented on Dec 6, 2019

    @arctouch-felipefontes
    Author

    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.

  8. stuartmorgan-g commented on Dec 6, 2019

    @stuartmorgan-g
    Contributor

    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.

  9. added
    P3Issues that are less important to the Flutter project
    on Jun 10, 2020
  10. felixwortmann commented on Mar 22, 2021

    @felixwortmann
  11. 43 remaining items

  12. stuartmorgan-g commented on Aug 16, 2023

    @stuartmorgan-g
    Contributor

    I have a branch that adds macOS support; if anyone wants to try it out you can add the following to your pubspec.yaml:

    dependency_overrides:
      google_sign_in_ios:
        git:
          url: https://github.com/stuartmorgan/packages.git
          ref: google-sign-in-macos
          path: packages/google_sign_in/google_sign_in_ios
    

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

  13. ditman commented on Dec 8, 2023

    @ditman
    Member

    Wow, super requested feature! Congrats!

  14. github-actions commented on Dec 22, 2023

    @github-actions

    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.

  15. locked as resolved and limited conversation to collaborators on Dec 22, 2023
  16. added
    team-macosOwned by the macOS platform team
    and removed on Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3Issues that are less important to the Flutter projecta: desktopRunning on desktopc: new featureNothing broken; request for a new capabilityp: google_sign_inThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.platform-macosBuilding on or for macOS specificallyteam-macosOwned by the macOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions