I have a question regarding the account linking, oauth authorization code flow on native IOS google assistant app. We have a very specific use case for the account linking. When the account linking is started and the google assistant app calls the authorization url, which is a deeplink to a native app (using firebase dynamic link for example), we want to handle authentication in our native app and afterwards redirect back to the google assistant app with the auth_code etc using a redirect on the redirect_uri (https://oauth-redirect.googleusercontent.com/r/...). So from the original call that opens a browser window we redirect to our native app on the device to do the authentication (using deeplink). Note: we save everything 'as is' when the original request is made on the auth url: client_id, response_type, state, redirect_uri. So we already checked that state etc is not modified and is as described in the documentation.
This flow is already working on Android devices however on IOS we are seeing different behavior. on IOS these steps work:
- call the authorization url
- intercept the url and open a native app using deeplinks
- authenticate in our own native app
But in the last step something goes wrong:
- redirect back to the native Google Assistant app by calling the redirect_uri (https://oauth-redirect.googleusercontent.com/r/...) enriched with auth_code
On IOS this last step does happen, so we get redirected back to the Google Assistant app, however nothing happens and account linking is not successful. Note again this does work on Android.
Does somebody have experience with using a deeplink to your own native app to do the authentication for account-linking and redirecting back to the Google Assistant app? Or does somebody know what the Google Assistant app does in the background when it calls the Authorization url on IOS: does it listen on a specific browser window? Can you only redirect on the original browser window or is any browser window fine? That type of technical info would be much appreciated as it cannot be found in the documentation.