google-services icon indicating copy to clipboard operation
google-services copied to clipboard

Google Sign In - Mac Catalyst support (iPad apps to Mac)

Open filippozanfini opened this issue 6 years ago • 25 comments

Will Google Sign In be supported on iPad apps running on Mac?

filippozanfini avatar Sep 16 '19 11:09 filippozanfini

I'm interested in this one as well

appfrilans avatar Oct 17 '19 07:10 appfrilans

This is also a critical need for our project.

terrillt avatar Oct 24 '19 19:10 terrillt

Any news?

LucaIaconelli avatar Nov 04 '19 16:11 LucaIaconelli

This is required for our app. Is this in pipeline? Any news?

chethanashastry avatar Nov 21 '19 06:11 chethanashastry

Is there any alternatives in the meantime?

appfrilans avatar Nov 21 '19 06:11 appfrilans

Ping?

yilei avatar Dec 09 '19 17:12 yilei

+1 This is critical for me.

girishw avatar Dec 19 '19 19:12 girishw

Updates?

itayAmza avatar Jan 08 '20 10:01 itayAmza

Any updates?

girishw avatar Mar 23 '20 20:03 girishw

It would be great if there was some update to this issue along with a sense of some timeframe.

Catalyst support is especially important for internal tools that use Google Auth on our end. At the very least perhaps some suggestions on alternative workarounds for the issue?

ptsochantaris avatar Apr 16 '20 09:04 ptsochantaris

Who are you?

On Thu, Apr 16, 2020, 2:41 PM Paul Tsochantaris [email protected] wrote:

It would be great if there was some update to this issue along with a sense of some timeframe.

Catalyst support is especially important for internal tools that use Google Auth on our end. At the very least perhaps some suggestions on alternative workarounds for the issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/googlesamples/google-services/issues/420#issuecomment-614520514, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO2U3MTHKY4VZLJHNYJXZ5DRM3DU7ANCNFSM4IXAV5XQ .

sayantan300 avatar Apr 16 '20 10:04 sayantan300

Any updates?

trannguyenvu91 avatar Jun 22 '20 08:06 trannguyenvu91

Any updates? (he also asked, expecting full well the answer to be crickets)

Does anybody else have thoughts or experience on possible workarounds for this problem? Any info would be greatly appreciated.

ptsochantaris avatar Jul 17 '20 08:07 ptsochantaris

I was able to make Google Sign In work with this: https://github.com/elsesiy/GAppAuth.

ondrejhanak avatar Jul 21 '20 16:07 ondrejhanak

@ondrejhanak Indeed, GAppAuth worked great, many thanks for the pointer. Amazing that the official SDK remains broken to this day.

ptsochantaris avatar Aug 19 '20 14:08 ptsochantaris

@ondrejhanak @ptsochantaris Would you mind posting a gist? Having trouble with this

natecraft1 avatar Aug 24 '20 03:08 natecraft1

@natecraft1 I personally just followed the iOS instructions on the README in that repo, and things worked great, except one issue where the server needed me to add some extra auth contexts via GAppAuth.shared.appendAuthorizationRealm, in our case it needed:

        GAppAuth.shared.appendAuthorizationRealm("email")
        GAppAuth.shared.appendAuthorizationRealm("profile")

in order to get the same id token that the app used to send to the server when it used the Google SDK. I assume the official SDK probably adds them by default? Apart from that, it "just worked". I hope this is of some help!

ptsochantaris avatar Aug 24 '20 14:08 ptsochantaris

@ondrejhanak @ptsochantaris Would you mind posting a gist? Having trouble with this

What is the issue you are running into?

girishw avatar Aug 24 '20 18:08 girishw

Chrome just redirects to google.com and the GAppAuth.shared.authorize() callback never gets called. If I change the default browser to Safari it says macOS doesn't recognize the internet address after trying to sign in with google.

natecraft1 avatar Aug 25 '20 04:08 natecraft1

@natecraft1 I personally just followed the iOS instructions on the README in that repo, and things worked great, except one issue where the server needed me to add some extra auth contexts via GAppAuth.shared.appendAuthorizationRealm, in our case it needed:

        GAppAuth.shared.appendAuthorizationRealm("email")
        GAppAuth.shared.appendAuthorizationRealm("profile")

in order to get the same id token that the app used to send to the server when it used the Google SDK. I assume the official SDK probably adds them by default? Apart from that, it "just worked". I hope this is of some help!

after the authorize succeeds how do we sign in to Firebase? Can I use this? Auth.auth().signIn(withCustomToken: idToken)

EDIT: turns out I had to call - (void)signInWithCredential:(FIRAuthCredential *)credential instead and build the credential with

(FIRAuthCredential *)credentialWithIDToken:(NSString *)IDToken
                                 accessToken:(NSString *)accessToken;

from GoogleAuthProvider

ApostolisApo avatar Sep 03 '20 19:09 ApostolisApo

In my ViewController:

class ViewController: NSViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        do {
            try GAppAuth.shared.authorize { (success) in
                // never called
            }
        } catch {
            print(error)
        }
    }

What happens is that it pops Safari, and when I sign in with my email, it just lands me on google.com and the callback is not called. Could it be an issue with the redirect URI? Also, why it doesn't use the default browser? Is that configurable?

Thanks @ptsochantaris @girishw @ApostolisApo 🙌

natecraft1 avatar Sep 13 '20 06:09 natecraft1

I NEED THIS

masaldana2 avatar Nov 30 '20 16:11 masaldana2

Any updates, Google? What an unresponsive team!

narek-sv avatar Mar 26 '21 07:03 narek-sv

I am also waiting for this!

appfrilans avatar Mar 26 '21 07:03 appfrilans

It would be great if one of the Google devs could provide some sort of update or ETA on this.

kenoButler avatar Jun 10 '21 01:06 kenoButler