Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
filippozanfini opened this issue Sep 16, 2019 · 25 comments
Open

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

filippozanfini opened this issue Sep 16, 2019 · 25 comments

Comments

@filippozanfini
Copy link

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

@appfrilans
Copy link

I'm interested in this one as well

@terrillt
Copy link

This is also a critical need for our project.

@LucaIaconelli
Copy link

Any news?

@chethanashastry
Copy link

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

@appfrilans
Copy link

Is there any alternatives in the meantime?

@yilei
Copy link

yilei commented Dec 9, 2019

Ping?

@girishw
Copy link

girishw commented Dec 19, 2019

+1 This is critical for me.

@itayAmza
Copy link

itayAmza commented Jan 8, 2020

Updates?

@girishw
Copy link

girishw commented Mar 23, 2020

Any updates?

@ptsochantaris
Copy link

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?

@sayantan300
Copy link

sayantan300 commented Apr 16, 2020 via email

@trannguyenvu91
Copy link

Any updates?

@ptsochantaris
Copy link

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.

@ondrejhanak
Copy link

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

@ptsochantaris
Copy link

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

@natecraft1
Copy link

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

@ptsochantaris
Copy link

@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!

@girishw
Copy link

girishw commented Aug 24, 2020

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

What is the issue you are running into?

@natecraft1
Copy link

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.

@ApostolisApo
Copy link

ApostolisApo commented Sep 3, 2020

@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

@natecraft1
Copy link

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 🙌

@masaldana2
Copy link

I NEED THIS

@narek-sv
Copy link

Any updates, Google? What an unresponsive team!

@appfrilans
Copy link

I am also waiting for this!

@kenoButler
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests