Skip to content
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

Using Federated Login/ Cognito with react-native #3210

Closed
waltermvp opened this issue May 2, 2019 · 29 comments · Fixed by #3633
Closed

Using Federated Login/ Cognito with react-native #3210

waltermvp opened this issue May 2, 2019 · 29 comments · Fixed by #3633
Labels
Auth Related to Auth components/category documentation Related to documentation feature requests React Native React Native related issue

Comments

@waltermvp
Copy link

waltermvp commented May 2, 2019

** Which Category is your question related to? **
Auth
** What AWS Services are you utilizing? **
Amplify +Cognito User Pools + federated identity + facebook login
** Provide additional details e.g. code snippets **

First of all Great lib thanks!.

I'm failing to get facebook login working using amplify with react-native.
I'm not sure exactly how the callback to the native mobile app works. I'm pretty sure my issue lies somewhere in callback configuration.
My react native app calls out using to facebook using:

 Auth.federatedSignIn({ provider: "Facebook" })

Facebook requests the permissions then and after the I confirm it calls out to :
https://MYAPPBUNDLEID:/authorize

I have set that value to the callback URL in my cognito app client settings to https://MYAPPBUNDLEID:/authorize

So my questions are:

  1. What value should the value for redirectSignIn in aws-exports be when using react-native? (is https://com.bundleid:/authrorize correct?)
  2. What value should I use for callback URLs in cognito's "App Client Settings" when using working with react-native? (is https://com.bundleid:/authrorize correct?)
  3. Do I need to handle the callback manually with iOS openurl API or do one of the AWS SDKs handle that for us? not clear in the docs?
@manueliglesias manueliglesias added Auth Related to Auth components/category documentation Related to documentation feature requests React Native React Native related issue labels May 2, 2019
@manueliglesias
Copy link
Contributor

Hi @waltermvp

Thanks for trying the lib!

Seems like our docs website was updated and some of those instructions got lost/moved.

Check this previous version of the docs, it might help

https://github.com/aws-amplify/docs/blob/34565927a3908b091c77fa5ef5aceab6fa7e9a2d/js/authentication.md#automated-setup-with-the-cli

I'll tag this issue as documentation so we can address the docs gap

@waltermvp
Copy link
Author

@manueliglesias thanks for the quick response 👍

@ghost
Copy link

ghost commented May 18, 2019

@waltermvp did you get a fix? im hitting the same issue. Im redirecting to myapp:// after verifying with facebook but im not sure on how to retrieve the auth data returned. using Hub.listen doesn't seem to work for me.

Any insight?

@waltermvp
Copy link
Author

@chriscraiclabs I got it working with using the redirecURI of MYAPPNAME://

@ghost
Copy link

ghost commented May 19, 2019

@waltermvp how did you retrieve the auth data on navigation back into the app? did you use Hub.listen? can you post some code snippets please?

@waltermvp
Copy link
Author

@chriscraiclabs I did. For me the issue was that i was using the incorrect redirectURI. Have you setup your android/ios app to handle the url linking call?

basic hub listening:

    Hub.listen("auth", async ({ payload: { event, data } }) => {
      switch (event) {
        case "signIn": {
          this.props.navigation.navigate("AppRootSwitchNavigator");
          this.setState({ user: data });
          break;
        }
        case "signOut": {
          this.props.navigation.navigate("Auth");
          this.setState({ user: null });
          break;
        }
      }
    });

@ghost
Copy link

ghost commented May 19, 2019

@waltermvp Have you an example/link of the url linking? is that on the native ios/android side? I have a standard login button also. it triggers the Hub.listen successfully so I know thats configured correctly.

@waltermvp
Copy link
Author

@ghost
Copy link

ghost commented May 20, 2019

@waltermvp I might be completely missing something here but why would we need push notifications for using a federated login for RN? Im not seeing any reference to this in the amplify Auth docs - https://aws-amplify.github.io/docs/js/authentication

Just looking at the RN linking docs. I thought setting up a custom url schememyapp:// would suffice. That doesn't look the case.

For React Native applications, You need to define a custom URL scheme for your application before testing locally or publishing to the app store. This is different for Expo or vanilla React Native. Follow the steps at the React Native Linking docs or Expo Linking docs for more information.

Did you have so call some function from the Linking class in order to listen for the incoming url from facebook? getInitialURL or something?

Thanks for all the info!

+@manueliglesias

@waltermvp
Copy link
Author

Your right I got confused. What you need is this https://facebook.github.io/react-native/docs/linking . Your app has to declare it can be opened using a ‘yourappname://‘ url scheme. This will be called by Cognito on sign in/out etc .

@ghost
Copy link

ghost commented May 20, 2019

@waltermvp ah, in that case, I do have that setup correctly "/. This is my current scenario:
signIn with facebook button -> navigated to facebook auth page -> navigated back into app.

This flow seems correct. The only issue is that I do not have access to the data returned (tokens etc...). The Hub.listen() does not get triggered with this scenario.

@waltermvp
Copy link
Author

In your aws exports try setting the type from code to token. Then in the Cognito console go to your app client settings and allow implicit grant . Give that a shot. (Make sure your using the current app client id that has implicit grant enabled )

@ghost
Copy link

ghost commented May 20, 2019

@waltermvp cool, ill give that a shot. Cheers!

@EmanH
Copy link

EmanH commented May 29, 2019

@chriscraiclabs Did you get your issue solved? I'm having the same issue.
@waltermvp Changing to implicit grant in Cognito, didn't solve the issue for me.

@EmanH
Copy link

EmanH commented May 29, 2019

I'm going from the App to Google oauth and back to the app successfully, but nothing picked up in hub listener.

#3342 (comment)

@EmanH
Copy link

EmanH commented May 29, 2019

Update
If I reload the app after doing the federatedSignIn, it HAS signed me in, but I have to reload the app in the emulator (rr) first. Will keep experimenting.

@ghost
Copy link

ghost commented May 29, 2019

@EmanH Hey, yeah im still having this issue. Interesting on the app refresh! How are you verifying that you are logged in? Are you triggering Auth.currentAuthenticatedUser() on load?

@EmanH
Copy link

EmanH commented May 29, 2019 via email

@ghost
Copy link

ghost commented May 29, 2019

@EmanH So is this your current flow:
google auth button > navigated out of app > auth > navigated back into app > nothing triggers > refresh app using cmd r > Hub.listen() is called ?

@EmanH
Copy link

EmanH commented May 29, 2019 via email

@EmanH
Copy link

EmanH commented May 29, 2019

I tried using the bare basic example from the Amplify docs. Same problem.
App.js

import { StyleSheet, Text, ScrollView, SafeAreaView, StatusBar, Button } from 'react-native';
import { default as Amplify } from "aws-amplify";
import { withOAuth } from "aws-amplify-react-native";
import { default as awsConfig } from "./aws-exports";

Amplify.configure(awsConfig);

class App extends React.Component {
  render() {
    const {
      oAuthUser: user,
      oAuthError: error,
      hostedUISignIn,
      facebookSignIn,
      googleSignIn,
      amazonSignIn,
      customProviderSignIn,
      signOut,
    } = this.props;

    return (
      <SafeAreaView style={styles.safeArea}>
        {user && <Button title="Sign Out" onPress={signOut} icon='logout' />}
        <ScrollView contentContainerStyle={styles.scrollViewContainer}>
          <Text>{JSON.stringify({ user, error, }, null, 2)}</Text>
          {!user && <React.Fragment>
            {/* Go to the Cognito Hosted UI */}
            <Button title="Cognito" onPress={hostedUISignIn} />

            {/* Go directly to a configured identity provider */}
            <Button title="Facebook" onPress={facebookSignIn} />
            <Button title="Google" onPress={googleSignIn}  />
            <Button title="Amazon" onPress={amazonSignIn} />

            {/* e.g. for OIDC providers */}
            <Button title="Yahoo" onPress={() => customProviderSignIn('Yahoo')} />
          </React.Fragment>}
        </ScrollView>
      </SafeAreaView>
    );
  }
}

const styles = StyleSheet.create({
  safeArea: {
    flexGrow: 1,
    paddingTop: StatusBar.currentHeight,
    backgroundColor: '#FFFFFF',
  },
  scrollViewContainer: {
    flexGrow: 1,
    alignItems: 'center',
    justifyContent: 'center',
  }
});

export default withOAuth(App);

@iamdavidmartin
Copy link

@EmanH were you able to get Hub events to fire? I'm having this exact issue as well.

@EmanH
Copy link

EmanH commented Jun 21, 2019

@iamdavidmartin Yes, I did. I re-created a reactive native project using Expo, then it worked as expected.
At some point I'm going to have to eject it though, so hope it keeps working after that.

@iamdavidmartin
Copy link

@EmanH I also had to use Expo to get the events to fire. The bare-bones projects didn't fire events and I have no idea what the difference is. The events do fire with the ignite-bowser boilerplate so if you don't want Expo, that's an option. Unfortunately that also puts you on an old version of react & react native which is why I'm using Expo now.

@pperron
Copy link

pperron commented Jul 11, 2019

@iamdavidmartin You have a sample of your Expo code ? When I try it with Expo, I could get "App --> Facebook login --> Back to App" and using the Facebook URL graphql to get the name of the user created but when I look into my Amazon Cognito, the user has not been added. So basically, I only know the user is logged from Facebook but is not part of my Amazon Cognito pool, meaning that I cannto control user access to all my other Amazon services...

I would really need the with0Auth() Amplify option to work and fire logIn event when I get back into my app. Currently trying to find why the event is not firing up after the hosted UI return me to my app.

Thanks !

manueliglesias added a commit to manueliglesias/aws-amplify that referenced this issue Jul 11, 2019
manueliglesias added a commit to manueliglesias/aws-amplify that referenced this issue Jul 11, 2019
manueliglesias added a commit that referenced this issue Jul 12, 2019
manueliglesias pushed a commit that referenced this issue Jul 18, 2019
* fix: allow SSE to be passed in global configure of storage

* fix: allow SSE to be passed in global configure of storage

* update messaging

* update messaging

* Adjust storage configure to look at a list in order to verify to add to storage

* add es2017 to tsconfig in storage

* Allow customers to add a custom state to federatedSignIn method (#3588)

* Update auth state

* Remove unneeded comments

* updating `isCustomStatePresent` to `combinedState`

* Updating naming conventions

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.0
 - @aws-amplify/auth@1.2.27-unstable.0
 - aws-amplify-angular@3.0.6-unstable.0
 - aws-amplify@1.1.31-unstable.0

* add new method to check the an string array, adjust isInStorageArrayKeys to use some

* feat (@aws-amplify/api): Added support for timeout in the init parameters supplied to API(#3473)

* feat (@aws-amplify/api):
- Added support for timeout in the init parameters supplied to API.[get/post/put/patch/del/head] requests
- Set default timeout to 0 in line with Axios's default timeout.

* Added a new test for the timeout parameter
Updated existing tests with the new timeout parameter

* Having another go at using an appropriate test

* timeout had a type. I'll get this eventually!

* Removed the expectedParams.url component that was relevant to the copied test and accidentally left in.

* chore: Fix versions [ci skip]

* Use specific Cypress spec file (#3630)

* Use specific spec for cypress tests

* Remove cypress branch exception

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.1
 - aws-amplify-angular@3.0.6-unstable.2
 - aws-amplify@1.1.31-unstable.2
 - @aws-amplify/storage@1.0.32-unstable.1

* fix(@aws-amplify/auth, aws-amplify-react-native): Fix OAuth flow in react native (#3633)

Fixes #3399
Closes #3576
Fixes #3247
Fixes #3592
Fixes #3210

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.2
 - @aws-amplify/auth@1.2.27-unstable.1
 - aws-amplify@1.1.31-unstable.3

* fix(@aws-amplify/ui): Fix the issue that window is not defined in @aws-amplify/ui in NodeJS (#3512)

* remove youtube-iframe and move the impl into MediaAutoTrack
* remove empty lines
* fix unit tests
* add globalTarget to webpack config
* change globalObject back to this

* chore(release): Publish [ci skip]

 - @aws-amplify/ui@1.0.21-unstable.0
 - aws-amplify-angular@3.0.6-unstable.3
 - aws-amplify@1.1.31-unstable.4

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message (#3589)

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message

* minor change

* fix unit tests

* chore(release): Publish [ci skip]

 - @aws-amplify/analytics@1.2.19-unstable.0
 - aws-amplify@1.1.31-unstable.5

* chore: Improve tooling for dev/test/deploy (#3513)

* Remove package-lock.json

* Remove pre-commit package

* Add husky

* Add --passWithNoTests to jest pkgs without tests

* Add/rename link-all/unlink-all scripts

* Remove linting from test

* Remove test script from package with no tests

* Fix credentials tests, use empty credentials

* Add test script for amazon-cognito-identity-js (passWithNoTests)

* Remove deprecated jest config mapCoverage

* Use lerna run instead of lerna exec

* Link and unlink in parallel

* Upgrade lerna

* Add test script, remove typescript formatter

* Remove old prettier

* code review comments

* Add missing .snap files

* Debug circleci

* Show diff when publishing

* Update lockfile to match circleci yarn version

* fix(@aws-amplify/core): Sort query strings by key when signing (#3583)

* fix(@aws-amplify/core): Sort query strings by key when signing

* Fix for multiple parameters with the same key

* fixes #3654 and bug in react url search params check (#3667)

* fixes #3654 and bug in react url search params check

* adds react fix to commit

* Publish

 - amazon-cognito-identity-js@3.0.14-unstable.0
 - @aws-amplify/ui@1.0.22-unstable.0
 - @aws-amplify/analytics@1.2.20-unstable.0
 - @aws-amplify/api@1.0.39-unstable.0
 - @aws-amplify/auth@1.2.28-unstable.0
 - aws-amplify-angular@3.0.7-unstable.0
 - aws-amplify-react-native@2.1.15-unstable.0
 - aws-amplify-react@2.3.11-unstable.0
 - aws-amplify@1.1.32-unstable.0
 - @aws-amplify/cache@1.0.29-unstable.0
 - @aws-amplify/core@1.0.29-unstable.0
 - @aws-amplify/interactions@1.0.32-unstable.0
 - @aws-amplify/pubsub@1.0.30-unstable.0
 - @aws-amplify/pushnotification@1.0.29-unstable.0
 - @aws-amplify/storage@1.0.33-unstable.0
 - @aws-amplify/xr@0.1.19-unstable.0

* Remove pager usage when git diffing in circleci

Update yarn.lock

* fix(@aws-amplify/core): Preserve port when created signed url (#3678)
@FooBarRaz
Copy link

I was experiencing similar issues with federated signin on ReactNative (no Expo). There were a couple of crucial things related to Linking that I was missing or had misconfigured --

  • You need to set the oauth.redirectSignIn (and redirectSignOut) in your AWS configuration to a URI specific to your app, e.g. myapp://main/.
  • In Xcode, you must edit your Info.plist to configure your build to recognize deep links to myapp://. But this is not enough.
  • In your AppDelegate.m file, you have to add these lines:
// iOS 9.x or newer
#import <React/RCTLinkingManager.h>

- (BOOL)application:(UIApplication *)application
   openURL:(NSURL *)url
   options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [RCTLinkingManager application:application openURL:url options:options];
}

This will allow your app to handle links. This is what was preventing my app from receiving the authentication data returned in the redirect (either code or token), and thus leaving the OAuth flow incomplete.

See here for more info.
Similar steps will need to be done on Android, but I haven't gotten that far yet.

@mguay22
Copy link

mguay22 commented Jan 15, 2020

@FooBarRaz You are a life saver.. my problem was the missing code snippet in AppDelegate.m

Is there any chance we can update the docs with a more specific explanation of deep linking related to Amplify? IMO the one FB offers is pretty lack luster and it took me as a newcomer to the library about half a day to wade through various scattered docs to hack together the solution that @FooBarRaz just elegantly provided.

computationalcore pushed a commit to computationalcore/amplify-js that referenced this issue Feb 4, 2020
* fix: allow SSE to be passed in global configure of storage

* fix: allow SSE to be passed in global configure of storage

* update messaging

* update messaging

* Adjust storage configure to look at a list in order to verify to add to storage

* add es2017 to tsconfig in storage

* Allow customers to add a custom state to federatedSignIn method (aws-amplify#3588)

* Update auth state

* Remove unneeded comments

* updating `isCustomStatePresent` to `combinedState`

* Updating naming conventions

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.0
 - @aws-amplify/auth@1.2.27-unstable.0
 - aws-amplify-angular@3.0.6-unstable.0
 - aws-amplify@1.1.31-unstable.0

* add new method to check the an string array, adjust isInStorageArrayKeys to use some

* feat (@aws-amplify/api): Added support for timeout in the init parameters supplied to API(aws-amplify#3473)

* feat (@aws-amplify/api):
- Added support for timeout in the init parameters supplied to API.[get/post/put/patch/del/head] requests
- Set default timeout to 0 in line with Axios's default timeout.

* Added a new test for the timeout parameter
Updated existing tests with the new timeout parameter

* Having another go at using an appropriate test

* timeout had a type. I'll get this eventually!

* Removed the expectedParams.url component that was relevant to the copied test and accidentally left in.

* chore: Fix versions [ci skip]

* Use specific Cypress spec file (aws-amplify#3630)

* Use specific spec for cypress tests

* Remove cypress branch exception

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.1
 - aws-amplify-angular@3.0.6-unstable.2
 - aws-amplify@1.1.31-unstable.2
 - @aws-amplify/storage@1.0.32-unstable.1

* fix(@aws-amplify/auth, aws-amplify-react-native): Fix OAuth flow in react native (aws-amplify#3633)

Fixes aws-amplify#3399
Closes aws-amplify#3576
Fixes aws-amplify#3247
Fixes aws-amplify#3592
Fixes aws-amplify#3210

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.2
 - @aws-amplify/auth@1.2.27-unstable.1
 - aws-amplify@1.1.31-unstable.3

* fix(@aws-amplify/ui): Fix the issue that window is not defined in @aws-amplify/ui in NodeJS (aws-amplify#3512)

* remove youtube-iframe and move the impl into MediaAutoTrack
* remove empty lines
* fix unit tests
* add globalTarget to webpack config
* change globalObject back to this

* chore(release): Publish [ci skip]

 - @aws-amplify/ui@1.0.21-unstable.0
 - aws-amplify-angular@3.0.6-unstable.3
 - aws-amplify@1.1.31-unstable.4

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message (aws-amplify#3589)

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message

* minor change

* fix unit tests

* chore(release): Publish [ci skip]

 - @aws-amplify/analytics@1.2.19-unstable.0
 - aws-amplify@1.1.31-unstable.5

* chore: Improve tooling for dev/test/deploy (aws-amplify#3513)

* Remove package-lock.json

* Remove pre-commit package

* Add husky

* Add --passWithNoTests to jest pkgs without tests

* Add/rename link-all/unlink-all scripts

* Remove linting from test

* Remove test script from package with no tests

* Fix credentials tests, use empty credentials

* Add test script for amazon-cognito-identity-js (passWithNoTests)

* Remove deprecated jest config mapCoverage

* Use lerna run instead of lerna exec

* Link and unlink in parallel

* Upgrade lerna

* Add test script, remove typescript formatter

* Remove old prettier

* code review comments

* Add missing .snap files

* Debug circleci

* Show diff when publishing

* Update lockfile to match circleci yarn version

* fix(@aws-amplify/core): Sort query strings by key when signing (aws-amplify#3583)

* fix(@aws-amplify/core): Sort query strings by key when signing

* Fix for multiple parameters with the same key

* fixes aws-amplify#3654 and bug in react url search params check (aws-amplify#3667)

* fixes aws-amplify#3654 and bug in react url search params check

* adds react fix to commit

* Publish

 - amazon-cognito-identity-js@3.0.14-unstable.0
 - @aws-amplify/ui@1.0.22-unstable.0
 - @aws-amplify/analytics@1.2.20-unstable.0
 - @aws-amplify/api@1.0.39-unstable.0
 - @aws-amplify/auth@1.2.28-unstable.0
 - aws-amplify-angular@3.0.7-unstable.0
 - aws-amplify-react-native@2.1.15-unstable.0
 - aws-amplify-react@2.3.11-unstable.0
 - aws-amplify@1.1.32-unstable.0
 - @aws-amplify/cache@1.0.29-unstable.0
 - @aws-amplify/core@1.0.29-unstable.0
 - @aws-amplify/interactions@1.0.32-unstable.0
 - @aws-amplify/pubsub@1.0.30-unstable.0
 - @aws-amplify/pushnotification@1.0.29-unstable.0
 - @aws-amplify/storage@1.0.33-unstable.0
 - @aws-amplify/xr@0.1.19-unstable.0

* Remove pager usage when git diffing in circleci

Update yarn.lock

* fix(@aws-amplify/core): Preserve port when created signed url (aws-amplify#3678)
rasfra pushed a commit to epidemicsound/amplify-js that referenced this issue Mar 11, 2020
* fix: allow SSE to be passed in global configure of storage

* fix: allow SSE to be passed in global configure of storage

* update messaging

* update messaging

* Adjust storage configure to look at a list in order to verify to add to storage

* add es2017 to tsconfig in storage

* Allow customers to add a custom state to federatedSignIn method (aws-amplify#3588)

* Update auth state

* Remove unneeded comments

* updating `isCustomStatePresent` to `combinedState`

* Updating naming conventions

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.0
 - @aws-amplify/auth@1.2.27-unstable.0
 - aws-amplify-angular@3.0.6-unstable.0
 - aws-amplify@1.1.31-unstable.0

* add new method to check the an string array, adjust isInStorageArrayKeys to use some

* feat (@aws-amplify/api): Added support for timeout in the init parameters supplied to API(aws-amplify#3473)

* feat (@aws-amplify/api):
- Added support for timeout in the init parameters supplied to API.[get/post/put/patch/del/head] requests
- Set default timeout to 0 in line with Axios's default timeout.

* Added a new test for the timeout parameter
Updated existing tests with the new timeout parameter

* Having another go at using an appropriate test

* timeout had a type. I'll get this eventually!

* Removed the expectedParams.url component that was relevant to the copied test and accidentally left in.

* chore: Fix versions [ci skip]

* Use specific Cypress spec file (aws-amplify#3630)

* Use specific spec for cypress tests

* Remove cypress branch exception

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.1
 - aws-amplify-angular@3.0.6-unstable.2
 - aws-amplify@1.1.31-unstable.2
 - @aws-amplify/storage@1.0.32-unstable.1

* fix(@aws-amplify/auth, aws-amplify-react-native): Fix OAuth flow in react native (aws-amplify#3633)

Fixes aws-amplify#3399
Closes aws-amplify#3576
Fixes aws-amplify#3247
Fixes aws-amplify#3592
Fixes aws-amplify#3210

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.2
 - @aws-amplify/auth@1.2.27-unstable.1
 - aws-amplify@1.1.31-unstable.3

* fix(@aws-amplify/ui): Fix the issue that window is not defined in @aws-amplify/ui in NodeJS (aws-amplify#3512)

* remove youtube-iframe and move the impl into MediaAutoTrack
* remove empty lines
* fix unit tests
* add globalTarget to webpack config
* change globalObject back to this

* chore(release): Publish [ci skip]

 - @aws-amplify/ui@1.0.21-unstable.0
 - aws-amplify-angular@3.0.6-unstable.3
 - aws-amplify@1.1.31-unstable.4

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message (aws-amplify#3589)

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message

* minor change

* fix unit tests

* chore(release): Publish [ci skip]

 - @aws-amplify/analytics@1.2.19-unstable.0
 - aws-amplify@1.1.31-unstable.5

* chore: Improve tooling for dev/test/deploy (aws-amplify#3513)

* Remove package-lock.json

* Remove pre-commit package

* Add husky

* Add --passWithNoTests to jest pkgs without tests

* Add/rename link-all/unlink-all scripts

* Remove linting from test

* Remove test script from package with no tests

* Fix credentials tests, use empty credentials

* Add test script for amazon-cognito-identity-js (passWithNoTests)

* Remove deprecated jest config mapCoverage

* Use lerna run instead of lerna exec

* Link and unlink in parallel

* Upgrade lerna

* Add test script, remove typescript formatter

* Remove old prettier

* code review comments

* Add missing .snap files

* Debug circleci

* Show diff when publishing

* Update lockfile to match circleci yarn version

* fix(@aws-amplify/core): Sort query strings by key when signing (aws-amplify#3583)

* fix(@aws-amplify/core): Sort query strings by key when signing

* Fix for multiple parameters with the same key

* fixes aws-amplify#3654 and bug in react url search params check (aws-amplify#3667)

* fixes aws-amplify#3654 and bug in react url search params check

* adds react fix to commit

* Publish

 - amazon-cognito-identity-js@3.0.14-unstable.0
 - @aws-amplify/ui@1.0.22-unstable.0
 - @aws-amplify/analytics@1.2.20-unstable.0
 - @aws-amplify/api@1.0.39-unstable.0
 - @aws-amplify/auth@1.2.28-unstable.0
 - aws-amplify-angular@3.0.7-unstable.0
 - aws-amplify-react-native@2.1.15-unstable.0
 - aws-amplify-react@2.3.11-unstable.0
 - aws-amplify@1.1.32-unstable.0
 - @aws-amplify/cache@1.0.29-unstable.0
 - @aws-amplify/core@1.0.29-unstable.0
 - @aws-amplify/interactions@1.0.32-unstable.0
 - @aws-amplify/pubsub@1.0.30-unstable.0
 - @aws-amplify/pushnotification@1.0.29-unstable.0
 - @aws-amplify/storage@1.0.33-unstable.0
 - @aws-amplify/xr@0.1.19-unstable.0

* Remove pager usage when git diffing in circleci

Update yarn.lock

* fix(@aws-amplify/core): Preserve port when created signed url (aws-amplify#3678)
@rahulje9
Copy link

I've figured out the part till deep linking, social auth is working but not as expected. The hub was not listening for the given events and then I dig deep and found that it was throwing
signIn_failure [NotAuthorizedException: Identity pool - * poolid * does not have identity providers configured.] but at the same time, the user details got registered in the aws, Any help would be appreciated.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2021
CongNguyen086 pushed a commit to CongNguyen086/amplify-js that referenced this issue Oct 5, 2022
* fix: allow SSE to be passed in global configure of storage

* fix: allow SSE to be passed in global configure of storage

* update messaging

* update messaging

* Adjust storage configure to look at a list in order to verify to add to storage

* add es2017 to tsconfig in storage

* Allow customers to add a custom state to federatedSignIn method (aws-amplify#3588)

* Update auth state

* Remove unneeded comments

* updating `isCustomStatePresent` to `combinedState`

* Updating naming conventions

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.0
 - @aws-amplify/auth@1.2.27-unstable.0
 - aws-amplify-angular@3.0.6-unstable.0
 - aws-amplify@1.1.31-unstable.0

* add new method to check the an string array, adjust isInStorageArrayKeys to use some

* feat (@aws-amplify/api): Added support for timeout in the init parameters supplied to API(aws-amplify#3473)

* feat (@aws-amplify/api):
- Added support for timeout in the init parameters supplied to API.[get/post/put/patch/del/head] requests
- Set default timeout to 0 in line with Axios's default timeout.

* Added a new test for the timeout parameter
Updated existing tests with the new timeout parameter

* Having another go at using an appropriate test

* timeout had a type. I'll get this eventually!

* Removed the expectedParams.url component that was relevant to the copied test and accidentally left in.

* chore: Fix versions [ci skip]

* Use specific Cypress spec file (aws-amplify#3630)

* Use specific spec for cypress tests

* Remove cypress branch exception

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.1
 - aws-amplify-angular@3.0.6-unstable.2
 - aws-amplify@1.1.31-unstable.2
 - @aws-amplify/storage@1.0.32-unstable.1

* fix(@aws-amplify/auth, aws-amplify-react-native): Fix OAuth flow in react native (aws-amplify#3633)

Fixes aws-amplify#3399
Closes aws-amplify#3576
Fixes aws-amplify#3247
Fixes aws-amplify#3592
Fixes aws-amplify#3210

* chore(release): Publish [ci skip]

 - @aws-amplify/api@1.0.38-unstable.2
 - @aws-amplify/auth@1.2.27-unstable.1
 - aws-amplify@1.1.31-unstable.3

* fix(@aws-amplify/ui): Fix the issue that window is not defined in @aws-amplify/ui in NodeJS (aws-amplify#3512)

* remove youtube-iframe and move the impl into MediaAutoTrack
* remove empty lines
* fix unit tests
* add globalTarget to webpack config
* change globalObject back to this

* chore(release): Publish [ci skip]

 - @aws-amplify/ui@1.0.21-unstable.0
 - aws-amplify-angular@3.0.6-unstable.3
 - aws-amplify@1.1.31-unstable.4

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message (aws-amplify#3589)

* fix(@aws-amplify/analytics): use startsWith to filter the updateEndpoint error message

* minor change

* fix unit tests

* chore(release): Publish [ci skip]

 - @aws-amplify/analytics@1.2.19-unstable.0
 - aws-amplify@1.1.31-unstable.5

* chore: Improve tooling for dev/test/deploy (aws-amplify#3513)

* Remove package-lock.json

* Remove pre-commit package

* Add husky

* Add --passWithNoTests to jest pkgs without tests

* Add/rename link-all/unlink-all scripts

* Remove linting from test

* Remove test script from package with no tests

* Fix credentials tests, use empty credentials

* Add test script for amazon-cognito-identity-js (passWithNoTests)

* Remove deprecated jest config mapCoverage

* Use lerna run instead of lerna exec

* Link and unlink in parallel

* Upgrade lerna

* Add test script, remove typescript formatter

* Remove old prettier

* code review comments

* Add missing .snap files

* Debug circleci

* Show diff when publishing

* Update lockfile to match circleci yarn version

* fix(@aws-amplify/core): Sort query strings by key when signing (aws-amplify#3583)

* fix(@aws-amplify/core): Sort query strings by key when signing

* Fix for multiple parameters with the same key

* fixes aws-amplify#3654 and bug in react url search params check (aws-amplify#3667)

* fixes aws-amplify#3654 and bug in react url search params check

* adds react fix to commit

* Publish

 - amazon-cognito-identity-js@3.0.14-unstable.0
 - @aws-amplify/ui@1.0.22-unstable.0
 - @aws-amplify/analytics@1.2.20-unstable.0
 - @aws-amplify/api@1.0.39-unstable.0
 - @aws-amplify/auth@1.2.28-unstable.0
 - aws-amplify-angular@3.0.7-unstable.0
 - aws-amplify-react-native@2.1.15-unstable.0
 - aws-amplify-react@2.3.11-unstable.0
 - aws-amplify@1.1.32-unstable.0
 - @aws-amplify/cache@1.0.29-unstable.0
 - @aws-amplify/core@1.0.29-unstable.0
 - @aws-amplify/interactions@1.0.32-unstable.0
 - @aws-amplify/pubsub@1.0.30-unstable.0
 - @aws-amplify/pushnotification@1.0.29-unstable.0
 - @aws-amplify/storage@1.0.33-unstable.0
 - @aws-amplify/xr@0.1.19-unstable.0

* Remove pager usage when git diffing in circleci

Update yarn.lock

* fix(@aws-amplify/core): Preserve port when created signed url (aws-amplify#3678)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Auth Related to Auth components/category documentation Related to documentation feature requests React Native React Native related issue
Projects
None yet
8 participants