From f24c43ffb0d701e9defb9a5598cefd8961708c1b Mon Sep 17 00:00:00 2001 From: natedog Date: Wed, 22 Nov 2017 21:48:49 +1100 Subject: [PATCH] ISSUE 16: Update to AuthClass Configure to use correct configuration property --- packages/aws-amplify-react-native/src/Auth/Auth.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/aws-amplify-react-native/src/Auth/Auth.js b/packages/aws-amplify-react-native/src/Auth/Auth.js index 9e1dc6cb384..6af6372a21e 100644 --- a/packages/aws-amplify-react-native/src/Auth/Auth.js +++ b/packages/aws-amplify-react-native/src/Auth/Auth.js @@ -68,7 +68,7 @@ class AuthClass { */ configure(config) { logger.debug('configure Auth'); - let conf = config? config.Analytics || config : {}; + let conf = config? config.Auth || config : {}; if (conf['aws_cognito_identity_pool_id']) { conf = { @@ -164,7 +164,7 @@ class AuthClass { /** * Sign in - * @param {String} username - The username to be signed in + * @param {String} username - The username to be signed in * @param {String} password - The password of the username * @return {Promise} - A promise resolves the CognitoUser object if success or mfa required */ @@ -318,7 +318,7 @@ class AuthClass { /** * Get current user's session - * @return {Promise} - A promise resolves to session object if success + * @return {Promise} - A promise resolves to session object if success */ currentUserSession() { if (!this.userPool) { return Promise.reject('No userPool'); } @@ -454,7 +454,7 @@ class AuthClass { /** * Initiate a forgot password request * @param {String} username - the username to change password - * @return {Promise} - A promise resolves if success + * @return {Promise} - A promise resolves if success */ forgotPassword(username) { if (!this.userPool) { return Promise.reject('No userPool'); } @@ -480,7 +480,7 @@ class AuthClass { /** * Confirm a new password using a confirmation Code - * @param {String} username - The username + * @param {String} username - The username * @param {String} code - The confirmation code * @param {String} password - The new password * @return {Promise} - A promise that resolves if success @@ -591,7 +591,7 @@ class AuthClass { /** * Compact version of credentials - * @param {Object} credentials + * @param {Object} credentials * @return {Object} - Credentials */ essentialCredentials(credentials) {