Git Product home page Git Product logo

aws-amplify-auth-starters's Introduction

AWS Amplify Authentication Starters

A collection of sample applications that make it easy to quickly get up and running with Authentication in AWS Amplify.

This project covers the following frameworks:

Features implemented in these examples:

  • User sign up
  • User sign in
  • Multi factor authentication (MFA)
  • Routing / Navigation Auth flows
  • Protected routes
  • Redirects for unauthorized users

License Summary

This sample code is made available under a modified MIT license. See the LICENSE file.

aws-amplify-auth-starters's People

Contributors

dabit3 avatar jpeddicord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-amplify-auth-starters's Issues

aws-amplify-react unused

Why import aws-amplify-react if you are not going to use it anywhere?

This sample should be updated to also take advantage of aws-amplify-react and the withAuthenticator HOC since that is the path that the vast majority of users will tread with AWS-Amplify Auth.

A section on Social SignIn is also badly needed especially around integrating with IdPs like Twitter that are not natively supported on the Amplify / Cognito dashboard.

Can't read console.log in react native version

I managed to get this running on my local emulator. However, I am not able to read any type of console.logs. When I start the bundler the app will load just fine, but then I get this message

::ffff:127.0.0.1 - - [15/Jan/2020:08:25:15 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 200 - "-" "okhttp/3.11.0"
::ffff:127.0.0.1 - - [15/Jan/2020:08:25:16 +0000] "GET /assets/src/assets/amplify.png?platform=android&hash=ea2db77f232a3a0a8fd05daf95808cdc HTTP/1.1" 200 - "-" "okhttp/3.11.0"

When I reload, I get

DELTA [android, dev] ....../index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)::ffff:127.0.0.1 - - [15/Jan/2020:08:28:05 +0000] "GET /index.delta?platform=android&dev=true&minify=false&deltaBundleId=501f65faf0ae5cbc HTTP/1.1" 200 69 "-" "okhttp/3.11.0"
DELTA [android, dev] ....../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.

Everything else seems to work just fine. Any ideas on why I'm not seeing any console.logs?

invalid phone number

Issue: aws-amplify/amplify-js#3868 (comment)

I have deployed using the click to deploy button.

While trying to sign in i get this error:

error signing up:  
Object { code: "InvalidParameterException", name: "InvalidParameterException", message: "Invalid phone number format." }

I get this whether the format is +1 999-999-9999 or 999-999-999 which should work if I am reading the following correctly:

    composePhoneNumber(dial_code, phone_line_number) {
        return `${dial_code || '+1'}${phone_line_number.replace(/[-()]/g, '')}`;
    }

https://github.com/aws-amplify/amplify-js/blob/ece0b229441357b754615052393e09bf8ecf6894/packages/aws-amplify-react/src/Auth/PhoneField.jsx#L25-L27

npx react-native run-android failed "Execution failed for task ':app:validateSigningDebug'."

This is probably an FAQ or doc update, but if you hit this issue, you can work around it by copying ANY debug.store to
/...yourpath.../aws-amplify-auth-starters/android/app/debug.keystore

For example:
cp /...yourpath.../aws-amplify-auth-starters/node_modules/react-native/template/android/app/debug.keystore /...yourpath.../aws-amplify-auth-starters/android/app/

And then the build worked.

Log:

Task :app:validateSigningDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible 
with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
150 actionable tasks: 3 executed, 147 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file '/...yourpath.../aws-amplify-auth-starters/android/app/debug.keystore' 
not found for signing config 'debug'.
* Try:
Run with --stacktrace option to get the stack trace. 
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 12s

react: sign-up does not work out of the box

Walking through the README and then trying to create a user, the sign-up page gives an error:

Attributes did not conform to the schema: custom:favorite_flavor: Attribute does not exist in the schema

Commenting out the relevant line makes the error go away, but it makes me wonder if the intent was to have the schema include a custom attribute?

Install fails.

I am not sure where to start but here is what is spit out when I try to install the node modules...

$ yarn install
yarn install v1.21.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected]".
warning "aws-amplify-react-native > [email protected]" has incorrect peer dependency "react-native-vector-icons@^4.2.0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "metro-react-native-babel-preset > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "react-navigation > [email protected]" has unmet peer dependency "react-native-gesture-handler@^1.0.0".
warning "react-navigation > [email protected]" has unmet peer dependency "react-native-screens@^1.0.0 || ^1.0.0-alpha".
warning "react-navigation > [email protected]" has unmet peer dependency "react-native-gesture-handler@^1.0.0".
warning "react-navigation > [email protected]" has unmet peer dependency "react-native-screens@^1.0.0 || ^1.0.0-alpha".
warning "react-navigation > [email protected]" has unmet peer dependency "react-native-screens@^1.0.0 || ^1.0.0-alpha".
warning "react-navigation > @react-navigation/core > [email protected]" has unmet peer dependency "prop-types@^15.0.0".
warning " > [email protected]" has unmet peer dependency "babel-core@^6.0.0 || ^7.0.0-0".
[4/4] 🔨 Building fresh packages...
[-/2] ⢀ waiting...
warning Error running install script for optional dependency: "/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents: Command failed.
Exit code: 1
Command: node install
Arguments:
Directory: /Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for "/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node" (not found)
node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v79-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/usr/local/Cellar/node/13.3.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/Cellar/node/13.3.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/seanrenet/Library/Caches/node-gyp/13.3.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/Cellar/node/13.3.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/seanrenet/Library/Caches/node-gyp/13.3.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:221:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Localv8::Context' to 'v8::Isolate '
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
val->To ## TYPE(isolate->GetCurrentContext()) \\n ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2762:37: note: passing argument to parameter 'isolate' here
Local ToBoolean(Isolate
isolate) const;
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:221:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Localv8::Context' to 'v8::Isolate '
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \\n ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate
isolate) const;
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Localv8::Context'
return scope.Escape(v8::Function::New( isolate
^~~~~~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:189:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument
class Local {
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:189:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:193:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate *'
V8_INLINE Local(Local that)
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:4313:22: note: passing argument to parameter 'context' here
Local context, FunctionCallback callback,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1064:53: error: no viable conversion from 'v8::Isolate *' to 'Localv8::Context'
v8::Localv8::String string = from->ToString(v8::Isolate::GetCurrent());
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:189:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument
class Local {
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:189:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:193:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate *'
V8_INLINE Local(Local that)
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:2751:22: note: passing argument to parameter 'context' here
Local context) const;
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1855:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1861:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(key, value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1867:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(index, value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1873:32: error: no matching member function for call to 'Get'
New(persistentHandle)->Get(New(key).ToLocalChecked()));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1879:48: error: no matching member function for call to 'Get'
return scope.Escape(New(persistentHandle)->Get(key));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1884:48: error: no matching member function for call to 'Get'
return scope.Escape(New(persistentHandle)->Get(index));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3594:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3597:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2698:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? _assert_rtn(func, FILE, LINE, #e) : (void)0)
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2698:
../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >'
persistent().MarkIndependent();
~~~~~~~~~~~~ ^
../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >'
assert(wrap->handle
.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(func, FILE, LINE, #e) : (void)0)
^
../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
static void Initialize(v8::Handlev8::Object exports);
~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder]
: async_resource("fsevents:FSEvents"), lockStarted(false) {
^
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: error: no matching member function for call to 'Set'
object->Set(Nan::Newv8::String("kFSEventStreamEventFlagNone").ToLocalChecked(), Nan::Newv8::Integer(kFSEventStreamEventFlagNone));

/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                  ^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                  ^
In file included from ../fsevents.cc:82:
../src/constants.cc:90:11: error: no matching member function for call to 'Set'
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagMustScanSubDirs\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                  ^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                  ^
In file included from ../fsevents.cc:82:
../src/constants.cc:91:11: error: no matching member function for call to 'Set'
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagUserDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagUserDropped));
~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                  ^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                  ^
In file included from ../fsevents.cc:82:
../src/constants.cc:92:11: error: no matching member function for call to 'Set'
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagKernelDropped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagKernelDropped));
~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                  ^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                  ^
In file included from ../fsevents.cc:82:
../src/constants.cc:93:11: error: no matching member function for call to 'Set'
object->Set(Nan::New<v8::String>(\"kFSEventStreamEventFlagEventIdsWrapped\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagEventIdsWrapped));
~~~~~~~~^~~
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3547:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                  ^
/Users/seanrenet/Library/Caches/node-gyp/13.3.0/include/node/v8.h:3550:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/13.3.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:219:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command \"/usr/local/Cellar/node/13.3.0_1/bin/node\" \"/usr/local/Cellar/node/13.3.0_1/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64\" \"--napi_version=5\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents
gyp ERR! node -v v13.3.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node --module_name=fse --module_path=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:219:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1027:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/13.3.0_1/bin/node\" \"/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents
node-pre-gyp ERR! node -v v13.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok 
Failed to execute 'node-gyp build --fallback-to-build --module=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64/fse.node --module_name=fse --module_path=/Users/seanrenet/Sites/AWS/Amplify Testing/aws-amplify-auth-starters/aws-amplify-auth-starters-react-native/node_modules/fsevents/lib/binding/Release/node-v79-darwin-x64 --napi_version=5 --node_abi_napi=napi' (1)"
✨  Done in 18.43s.

Can I use exsiting cognito pool

I wish to use this but already have a cognito user pool that I want to reuse. Can I attach the existing pool instead of creating one? Specifically, where can I configure the pool name/arn?

Must run amplify init before react-native run-android

When you run npx react-native run-android and you've never run amplify init before you will get a lot of missing file errors related to AWS (I didn't capture the log sorry). Once you do run init though you can run the android build and it will launch in the virtual Android device.

I think the README just needs a tweak so you run amplify init before you run the build.
You CAN run the build before you push, you'll get a different error but you can see the app launch which is great for beginners. You should probably recommend running push first though as well.

I have new laptop and I think this is why I hit this; if you've run amplify init before I don't think you will.

React version - EnableSoftwareTokenMFAException - Code mismatch and fail enable Software Token MFA

Hello @jpeddicord and @dabit3, we are trying to implement this solution in one of our React applications. We downloaded the react example and tied it to our existing Cognito User Pool. Authentication works fine, but when we try to enable TOTP for a user we are always getting this error

{__type: "EnableSoftwareTokenMFAException",…}
message: "Code mismatch and fail enable Software Token MFA"
__type: "EnableSoftwareTokenMFAException"

The apps we used to generate the TOTP code were Authy and Google Authenticator

Can you verify if there are any issues with the React version of this sample? or it could be a configuration issue in Cognito?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.