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

AmplifySignUp can lock user on page if email is not required #8323

Closed
3 tasks done
wylie39 opened this issue May 20, 2021 · 2 comments
Closed
3 tasks done

AmplifySignUp can lock user on page if email is not required #8323

wylie39 opened this issue May 20, 2021 · 2 comments
Labels
to-be-reproduced Used in order for Amplify to reproduce said issue UI Related to UI Components

Comments

@wylie39
Copy link

wylie39 commented May 20, 2021

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

Authentication

Amplify Categories

auth

Environment information

# Put output below this line
  System:
    OS: macOS 11.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 497.93 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm
  Browsers:
    Chrome: 90.0.4430.212
    Safari: 14.1
  npmPackages:
    @aws-amplify/ui-react: ^0.2.38 => 0.2.38
    @sentry/react: ^6.4.1 => 6.4.1
    @sentry/tracing: ^6.4.1 => 6.4.1
    aws-amplify: ^4.0.2 => 4.0.2
    bootstrap: ^5.0.1 => 5.0.1
    enzyme: ^3.11.0 => 3.11.0
    enzyme-adapter-react-16: ^1.15.6 => 1.15.6
    jest: 26.6.0 => 26.6.0
    prettier: 2.3.0 => 2.3.0
    react: 17.0.2 => 17.0.2
    react-bootstrap: ^1.6.0 => 1.6.0
    react-dom: 17.0.2 => 17.0.2
    react-html-parser: ^2.0.2 => 2.0.2
    react-html-parser-demo:  0.0.0
    react-router-dom: ^5.2.0 => 5.2.0
    react-scripts: 4.0.3 => 4.0.3
    react-test-renderer: ^17.0.2 => 17.0.2 (16.14.0)
    typescript: 4.2.4 => 4.2.4
  npmGlobalPackages:
    @aws-amplify/cli: 4.43.0
    npm: 6.14.11

Describe the bug

When using AmplifyAuthenticator and AmplifySignUp without an email or phone field and all verification turned off it still asks you to enter a verification code. This then locks the user on that page because they can’t be sent a code.

Expected behavior

It should skip the verification page if no email or phone number is available and go right to the app.

Reproduction steps

1.Configure a react app using AmplifyAuthenticator with the code snippet below.
2. Set Cognito to have no verification and not require email or phone. See photo.
3. Start the app.
4. Try to create an account.

Code Snippet

<AmplifyAuthenticator>
			<AmplifySignUp
				slot="sign-up"
				formFields={[
					{ type: 'username' },
					{ type: 'password' },
					{
						type: 'nickname',
						label: 'Nickname',
						placeholder: 'Nickname',
					},
				]}
			/>
</AmplifyAuthenticator>

Log output

No response

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

Cognito with no verification.
Screen Shot 2021-05-20 at 4 44 51 PM

@wylie39 wylie39 changed the title AmplifySignUp can lock user if email is not required AmplifySignUp can lock user on page if email is not required May 20, 2021
@chrisbonifacio chrisbonifacio added UI Related to UI Components to-be-reproduced Used in order for Amplify to reproduce said issue labels May 21, 2021
@ErikCH ErikCH added this to the Current UI Fixes milestone May 21, 2021
@wylie39
Copy link
Author

wylie39 commented May 21, 2021

It turns out that is not a bug. AWS Cognito requires that all accounts be confirmed. If you don't have an email or password field you have to have a lambda mark the account as confirmed automatically. Once this is set up the UI behaves as expected and skips the confirm page.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
to-be-reproduced Used in order for Amplify to reproduce said issue UI Related to UI Components
Projects
None yet
Development

No branches or pull requests

3 participants