hideSignUp doesn't work with amplify-authenticator - Vue 3.x
See original GitHub issueDescribe the bug
When I use the amplify-authenticator
component in a new project and try to hide the sign up link the hide-sign-up
attribute doesn’t work properly
To Reproduce Steps to reproduce the behavior:
- Create new Vue 3.x app with
vue create myamplifyproject
(choose default values) - Add Amplify packages
npm install aws-amplify @aws-amplify/ui-components
- Import components in
src/main.js
import { createApp } from 'vue'
import App from './App.vue'
import { applyPolyfills, defineCustomElements } from '@aws-amplify/ui-components/loader';
applyPolyfills().then(() => {
defineCustomElements(window);
});
const app = createApp(App);
app.config.isCustomElement = (tag) => tag.startsWith('amplify-');
app.mount('#app');
- Add template to
App.vue
<template>
<amplify-authenticator username-alias="email">
<amplify-sign-in hide-sign-up="true" />
</amplify-authenticator>
</template>
- Start app with
npm run serve
Expected behavior The sign up block is hidden and can’t see the “No account? Create account” option
Additional context
I started a debugger and saw that the <amplify-sign-in>
component’s render method is called twice. The first time the hideSignUp
attribute is correctly set to true
, however when it’s called the second time this value is overwritten with false
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
8 New features in the Amplify Authenticator for web you ... - AWS
1. Easily customize form fields and sign up order · 2. Headless hooks to customize your UI · 3. Built-in password strength support...
Read more >How do I disable the sign up link for the aws amplify vue ...
I'm trying to figure out how to disable the "Create Account" link on the front end and I can't seem to find anything...
Read more >AWS cognito using AWS amplify with Vue3 fails to show the ...
I am using vue3 and have set up an AWS user pool (amazoncognito.com) using the was web-console. The goal is to authenticate users...
Read more >Create A Vue.js 3 Full Stack Application With Amplify ...
In this video I create a full stack app for #teamseas including AWS amplify, Appsync, Lambda, Cognito for Authentication and Authorization ...
Read more >Building a Login Function with AWS Amplify, Amplify UI Vue ...
Build AWS Amplify and Vue 3 environment ... Write the code for the authentication part in the router, and the UI can be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@joshfriend the problem still remains:
Vue 3 DOES NOT allow slot attributes, which is the way to customize the component @aws-amplify/ui-components -> see link, so the Vue 3 aws-amplify-ui component CANNOT be customized in Vue 3, which is strange.
I ended up cloning the repo, modifing it and rebuilding my own version with the defaults I needed.
II’m also going to close this particularly issue so we can track it in the other feature request issue you linked to.