I'm currently using AWS Amplify auth, using Cognito for React authentication. User sign-ups must confirm their new account by clicking on a confirmation link they receive via email.
When a submits their sign-up info, the next UI that is displayed is Confirm Signup that asks the user to confirm a code. I do not need this stage, as this is handled when the user confirms their email.
I'm using the react-ui Amplify components to control authentication and user signup/in/out.
import React from "react";
import "./App.css";
import { BrowserRouter as Router } from "react-router-dom";
import "bootstrap/dist/css/bootstrap.min.css";
import { Container } from "react-bootstrap";
import NavBar from "./components/NavBar.js";
import {
  AmplifyAuthenticator,
  AmplifySignUp,
  AmplifyConfirmSignUp,
  AmplifySignOut,
} from "@aws-amplify/ui-react";
import RouteContainer from "./components/RouteContainer";
function App() {
  return (
    <div>
      <AmplifyAuthenticator usernameAlias="email">
        <AmplifySignUp
          slot="sign-up"
          usernameAlias="email"
          formFields={[
            {
              type: "email",
              label: "Enter your email",
              placeholder: "Enter your email",
              required: true,
            },
            {
              type: "password",
              label: "Enter your password",
              placeholder: "",
              required: true,
            },
            {
              type: "custom:postcode",
              label: "Enter your postcode",
              placeholder: "",
              required: true,
            },
          ]}
        >
          <AmplifyConfirmSignUp/>
        </AmplifySignUp>
        <AmplifySignOut />
        <Router>
          <Container>
            <RouteContainer />
          </Container>
        </Router>
        <NavBar />
      </AmplifyAuthenticator>
    </div>
  );
}
export default App;
Is there a prop I can pass to disable <AmplifyConfirmSignUp/> or another way to disable this from the standard sign-up flow?
Thanks.
You can disable verification in Cognito panel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With