-
Notifications
You must be signed in to change notification settings - Fork 262
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
Zero-config + Sign in with Apple #626
Conversation
yarn global add @aws-amplify/cli@beta 6.5.0-beta.0
🦋 Changeset detectedLatest commit: 122b146 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request introduces 1 alert when merging 54fe748 into 391e2f3 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary change is that login_mechanisms
has been split out into loginMechanisms
(username
, email
, phone_number
) and socialProviders
based on the zero-config values.
@@ -1,3 +1,4 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the environments/*
updates are from yarn environments pull
using the new CLI beta – 6.5.0-beta.0
const actorState: SignUpState = getActorState(state); | ||
const actorState = getActorState(state) as SignUpState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c0f1baa
to
acb718e
Compare
@ErikCH found the issue! https://github.com/aws-amplify/amplify-ui/tree/main/environments/auth-with-totp-mfa is an imported Cognito User Pool, so it isn't getting the zero-config values correctly like others: // aws-exports.js
/* eslint-disable */
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = {
"aws_project_region": "us-east-1",
"aws_cognito_region": "us-east-1",
"aws_user_pools_id": "us-east-1_•••••",
"aws_user_pools_web_client_id": "•••••",
"oauth": {},
"aws_cognito_username_attributes": [],
"aws_cognito_social_providers": [],
"aws_cognito_signup_attributes": [],
"aws_cognito_mfa_configuration": "ON",
"aws_cognito_mfa_types": [],
"aws_cognito_password_protection_settings": {
"passwordPolicyCharacters": []
},
"aws_cognito_verification_mechanisms": []
};
export default awsmobile; Notice how @lazpavel What's your take on it? |
Imported environments don't work with zero-config (yet): #626 (comment)
…nto 609-zero-config
I introduced a new |
This pull request introduces 4 alerts and fixes 2 when merging 9fd0972 into 6c57ef8 - view on LGTM.com new alerts:
fixed alerts:
|
// Prefer explicitly configured settings over default CLI values | ||
return { | ||
loginMechanisms: loginMechanisms ?? cliLoginMechanisms, | ||
socialProviders: socialProviders ?? cliSocialProviders.sort(), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, understood
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the Vue changes, and overall looks good. But I'll refer to @wlee221 expertise in the other areas and Angular
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚢
This pull request introduces 4 alerts and fixes 2 when merging 52d7fe1 into d71e656 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 4 alerts and fixes 2 when merging 122b146 into d71e656 - view on LGTM.com new alerts:
fixed alerts:
|
Description of changes:
Updates
authMachine
to have bothloginMechanisms
andsocialProviders
based on new Amplify CLI zero-configaws-exports.js
. (Closes Update examples to use zero-config #609)This means that most usage will just be
withAuthenticator
or<Authenticator>
!Adds
Sign in with Apple
button (Closes Sign in with Apple #607)apple.mp4
Fix React to use
loginMechanisms
andsocialProviders
Fix Angular to use
loginMechanisms
andsocialProviders
Fix Vue to use
loginMechanisms
andsocialProviders
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.