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

ISSUE 16: Update to AuthClass Configure to use correct configuration … #17

Merged
merged 1 commit into from
Nov 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/aws-amplify-react-native/src/Auth/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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'); }
Expand Down Expand Up @@ -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'); }
Expand All @@ -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
Expand Down Expand Up @@ -591,7 +591,7 @@ class AuthClass {

/**
* Compact version of credentials
* @param {Object} credentials
* @param {Object} credentials
* @return {Object} - Credentials
*/
essentialCredentials(credentials) {
Expand Down