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
vueCompilerOptions: { | |
isCustomElement: tag => tag.startsWith('amplify-') | |
} |
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
import Amplify from "aws-amplify"; | |
import { | |
CognitoUserInterface, | |
onAuthUIStateChange, | |
AuthState, | |
} from "@aws-amplify/ui-components"; | |
import { AmplifyAuthenticator, AmplifyTotpSetup } from "@aws-amplify/ui-react"; | |
import { useEffect, useState } from "react"; | |
Amplify.configure({ /** redacted */ }); |
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
const fetchMachine = Machine({ | |
id: "signUp", | |
initial: "edit", | |
type: 'parallel', | |
states: { | |
validation: { | |
initial: 'pending', | |
states: { | |
pending: { | |
invoke: { |
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
Machine( | |
{ | |
id: 'signUp', | |
initial: "edit", | |
exit: ["clearFormValues", "clearError"], | |
states: { | |
edit: { | |
on: { | |
SUMBIT: "submit" | |
} |
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
Machine( | |
{ | |
id: 'signUp', | |
initial: "edit", | |
exit: ["clearFormValues", "clearError"], | |
states: { | |
edit: { | |
id: "edit", | |
initial: "noError", | |
type: "parallel", |
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
import { Component, State, Prop, h, Host, Element, forceUpdate } from '@stencil/core'; | |
import { | |
AuthState, | |
CognitoUserInterface, | |
FederatedConfig, | |
UsernameAliasStrings, | |
AuthStateHandler, | |
} from '../../common/types/auth-types'; | |
import { | |
AUTH_CHANNEL, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
<AmplifyAuthContainer> | |
<AmplifyAuthenticator usernameAlias="email"> | |
<AmplifySignIn | |
slot="sign-in" | |
headerText="My Custom Sign In" | |
usernameAlias="email" | |
formFields={[ | |
{ | |
type: 'email', | |
label: 'Custom Email Label', |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
NewerOlder