We can't do account linking using iOS's Google assistant app

318 Views Asked by At

I want to realize account linking to Google account with Google Home. On realizing this, our app's flow of account linking follow to this page.

It page shows this.

  1. ...so we send back a message saying they need to visit our website to authorize us to access their Google services. We may require them to switch to a mobile device to do this part and even include a link to the login page.

At this part, we use GoogleHome's rich response to send authentication link to user's mobile device.
For example,

    payload: {
            google: {
                expectUserResponse: true,
                richResponse: {
                    items: [
                        {
                            simpleResponse: {
                                textToSpeech: "textToSpeech"
                            }
                        },
                        {
                            basicCard: {
                                title: "Title",
                                formattedText: "formattedText",
                                buttons: [
                                    {
                                        title: "ButtonTitle",
                                        openUrlAction: {
                                            url: "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https//www.googleapis.com/auth/calendar.readonly&response_type=code&client_id=xxx.apps.googleusercontent.com&redirect_uri=https//project.com"
                                        }
                                    }
                                ],
                            }
                        }
                    ]
                }
            }
        }
    

We can do account linking using Android OS, but iOS can't do that due to 403 error. We've investigated the cause, it needs to use a specific browser to see google authentication page.

How can I do account linking to avoid such problem?
Or could you tell me another way to do account linking to Google account.

Please excuse my poor English. Thank you.

1

There are 1 best solutions below

0
On

As per Actions on Google policy, your account linking should be owned or controlled by you. It seems like your account linking is trying to use Google OAuth directly.

You could use Google Sign-in directly, which provides a better UX, although that flow will not give you the ability to request any scopes like calendar. You would need to handle users who don't have authorized scopes until they grant the scopes to your service in another matter such as visiting your website in a web browser.