aws-amplify-vue | A Vue.js starter app integrated with AWS Amplify | AWS library
kandi X-RAY | aws-amplify-vue Summary
kandi X-RAY | aws-amplify-vue Summary
A VueJs starter app integrated with aws-amplify. Please submit issues to the aws-amplify repository.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-amplify-vue
aws-amplify-vue Key Features
aws-amplify-vue Examples and Code Snippets
Community Discussions
Trending Discussions on aws-amplify-vue
QUESTION
When calling Auth.currentUserCredentials() after Auth.signIn() I get valid valid credentials, but for an unauthenticated user, why?
Code:
...ANSWER
Answered 2021-Feb-14 at 12:39I understand where you're coming from, and honestly I can't really show you clear documentation that exactly states why this won't work. AWS documentation on Cognito and Amplify is difficult to piece together, both because the Amplify framework still uses an old library under the hood ('amazon-cognito-identity-js') and Cognito is the name for both a connect-login-with-IAM and signup/signin-as-a-service offering. Cognito is super powerful and rock solid in terms of security if done right, but the setup is a bit of a pain.
There's a bit of documentation, e.g. the API docs of Amplify Auth here. You can see there that currentCredentials / currentUserCredentials gives you some object which contains among other things an 'identitiId'. Credentials, in the Amplify Auth framework, refer to AWS IAM credentials that refer to an Cognito Identity.
You seem to be using Amplify to login to a Cognito User Pool, using email/password. A Cognito User Pool can be connected to a Cognito Identify pool, to 'exchange' a Cognito JWT token for some credentials that can be used to use AWS resources (IAM credentials). This is not needed to have a normal sign in / sign up flow working though.
So, the question is: what do you want?
Do you want to know about the currently logged in Cognito User Pool user, e.g. his email, JWT token and other fields that are stored in the JWT token? Use 'currentUserInfo' or 'currentUserSession'
Do you actually want to have some IAM credentials to invoke AWS resources? Make sure to create and connect your Cognito User Pool with a Cognito Identity Pool and configure your Identity Pool id in your frontend settings. If you've done that, you should be able to use 'currentCredentials'.
QUESTION
I wanted to have urls that I could copy and paste and therefore switched from spa to universal in nuxt.config. However I get this error saying "document is not defined". I then googled my way to this answer saying I should use the element.
However after using it on my index.vue, I still get the same error. Anyone who can help me out?
It's node_modules/aws-amplify-vue/dist/aws-amplify-vue.common.js who is complaining about the document missing.
And to test at the moment my index.vue is following:
...ANSWER
Answered 2020-Jul-23 at 06:42For anyone having the same issue, the solution in my case was as following:
- adding if (process.client) to my middleware (middleware/auth.js) and require AmplifyEventBus afterwards:
QUESTION
I'm using the amplify-authenticator
component from the aws-amplify-vue
library to enable authentication for my app. 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 in the documentation or online. I've seen a few places where users disabled it by hiding it with css and a few places where users were able to disable it with the react library, but I haven't found anything specific for the vue library. It's possible I'm just missing the documentation, but does anyone know how to remove the sign up functionality from the vue amplify authenticator?
ANSWER
Answered 2020-Feb-19 at 21:39You can hide the "sign up" section via the "signInConfig" object.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-amplify-vue
Copy your aws-exports file into the src directory, or intialize a new AWS Amplify CLI project:
Start the project
It is recommended to configure Amplify library at the entry point of application. Here we choose main.js.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page