-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How to hide the Authentication toast in a vuejs app #6167
Comments
@kjetilge can you share your package.json? |
package.json
|
Transferring this to our Amplify Docs repo as its a miss in documentation |
Transferring back as a FR. |
Status? Can we use the Amplify Hub to prevent this event? If yes, documentation? |
I've just hit this - Any suggestions on how to move forward @mauerbac @sammartinez ? |
While I couldn't find a way to remove it completely it has a As the new web components use the Toast component to signal authentication failures e.g. sign-in, sign-up, etc., I've dug into the source code and created my own notification to replace Toast using the undocumented "UI Auth" channel. <script>
import { Hub } from 'aws-amplify'
const noAuthMessage = 'user is undefined'
...
created() {
Hub.listen('UI Auth', (data) => {
const event = data.payload?.event ?? ''
const message = data.payload?.message ?? ''
// Ignore message if customer hasn't attempted to login yet
if (message === noAuthMessage) return
if (event === 'ToastAuthError') {
this.$q.notify(message)
}
})
}
</script> Once I complete what I'm doing I'll make a PR to the docs to include other bits I missed too |
Hello all, #7129 added <amplify-authenticator hide-toast></amplify-authenticator> To see how you can create your own custom alert, see @Luke-Davies' example here #6479 (comment). We will close this issue as #6479 fixes this, but please feel free to ask any questions. |
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 |
I'm using the Amplify UI for auth in a Vue app. In the docs there is no description of how to customize or hide amplify-toast when auth errors occurs.
I expected to be able to do something like this:
Well, that doesn't work. Any suggestions ?
The text was updated successfully, but these errors were encountered: