Amplify and Social Login (Federated) with Cognito pools


We have a app with amplify and ionic ( 5.4.9, below more info) . All works fine , s3, auth , analitycs , admin queries , auth .

But with auth and Federated Social Login we have problems with Android , on Web works fine.

We singup with Google Federated HostedUI on Cognito pools and auth works fine, but when can back to us we capture with deeplinks , and deeplinks trigger ok .

On next step when redirect from deeplinks to page for use , amplify detect SignIn with “A user Google_103030042694745594198 has been signed in” , that is ok.

But after that give us a error like this :

Failed to execute ‘replaceState’ on ‘History’: A history state object with URL 'com.movilgate.awslogin://app/auth/signin/'

We have an exception in this step and call Auth.currentAuthenticatedUser() , but we don’t know if that is ok , and is very ugly method .

Exists any example o technique for this works fine on android ?

ionic info :


Ionic CLI : 5.4.9 (/Users/mtoro/.ionic/Studio/Tools/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0


Cordova CLI : 9.0.3 (cordova-lib@9.0.2)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 5 other plugins)


cordova-res : 0.6.0 (update available: 0.11.0)
native-run : 0.2.8 (update available: 1.0.0)


NodeJS : v12.16.1 (/Users/mtoro/.nvm/versions/node/v12.16.1/bin/node)
npm : 6.13.4
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504

I have spent all weekend on this, how are you triggering the deeplink to work.

I am using cognito and can get it to wake on my custom protocol (myapp://) and my universal links are also waking up but I can’t trap the link back in deeplinks plugin.

Be useful to chat to someone to share our experiences.

Thanks for any help


Check this :

I put code here …