question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hideSignUp doesn't work with amplify-authenticator - Vue 3.x

See original GitHub issue

Describe 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:

  1. Create new Vue 3.x app with vue create myamplifyproject (choose default values)
  2. Add Amplify packages npm install aws-amplify @aws-amplify/ui-components
  3. 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');
  1. Add template to App.vue
<template>
  <amplify-authenticator username-alias="email">
    <amplify-sign-in hide-sign-up="true" />
  </amplify-authenticator>
</template>
  1. 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:closed
  • Created 3 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
GoodLuccommented, Apr 30, 2021

@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.

1reaction
amhinsoncommented, Oct 20, 2020

II’m also going to close this particularly issue so we can track it in the other feature request issue you linked to.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found