forked from aws-amplify/amplify-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui-core): auth machine refactor with actors (aws-amplify#180)
* setup local dev helper * Set tab size * initial directory setup * sign in actor skeleton implementation * sign in staging * Temp workaround for sign in to render * signIn initial refactor * signUp initial refactor * removed unused import * Remove unused actors * Remove unused exports * spawn signIn and signUp with context * Send CHANGE event instead of INPUT * signIn with context values * fix typo * Rename INPUT to CHANGE * Set user on success * Enable uncofirmed signIn -> confirmSignUp use case * get context from actor whenever needed * Be explicit about what each actor passes * implement signOut actor * use actor context * formalize logic for passing contexts between actors * remove TODO * fix reference * fix function signature * Remove unneeded context * Removed unused export * Use intent instead of an explicit error * enable auto sign in * send autoSignIn intent from signUp * Move context definitions to /types * Update actor changes to forceNewPassword * get challengeName from actor * provide initial context and don't use sync * Reflect actor changes to React! * sendUpdate on each validation * vue refactors! * Don't finish on federatedSignIn * fix typo * implement resetPassword * use formValues from context * pass login_mechanism * display error on signIn * persist through authAttributes * Remove unused var * Remove unused actions * Remove unnecessary check * clear formValues on transition * Remove context from actor def * Remove unused transition * Update packages/vue/src/components/confirm-sign-up.vue Co-authored-by: Erik Hanchett <[email protected]> * Use first available username * Pass username from signIn with `authAttributes` * Use username from authAttributes.username * Remove unused export * Separaete out invoke event types * Use Record<PropertyKey, any> * call federatedSignIn from confirm-sign-up * Rename state to _state * Remove unnecessary state export * check both username sources * Strictly type helper functions * Strongly type helpers in Vue * React: use tryped result from helpers * Add missed assertions * More vue strong typings * Fianl strongly typed actorState! * Update packages/core/src/types/authMachine.ts Thanks @eddiekeller! Co-authored-by: Eddie Keller <[email protected]> * Update packages/react/src/components/Authenticator/SignIn/SignIn.tsx * Forward SIGN_IN event * Remove unused imports * Fix angular build * Type ErrorText context * Provide default context * get user from context * Remove autoSignIn state and go directly to signIn.submit * Remove unused import/var * Update packages/core/src/machines/authMachine.ts Co-authored-by: Erik Hanchett <[email protected]> Co-authored-by: Eddie Keller <[email protected]>
- Loading branch information
1 parent
30bcaf1
commit 31a11b3
Showing
46 changed files
with
1,242 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.