Introduction
In this article, an application will be created using the latest version of Angular with authentication using the Amazon Co...
For further actions, you may consider blocking this person and/or reporting abuse
Great showcase! Congratulations!
Thank you very much Tomaz!
Very well explained, it helped a lot! The amplify library has undergone some changes since 2023. After reading it, I was able to adapt it perfectly.
For those who need it: (docs.amplify.aws/angular/build-a-b...)
Hi, before all thank you very much for the post.
I'm working based on this exaple including cognito service into a monorepo with dynamic module federation, but only Amplify.configure makes app crash returning the message: "Maximum call stack size exceeded", I did this same on a simple project and works fine but on monorepo I'm having the commented issue. Did you know how to solve this?
Thanks in advance.
Hello,
I've tried all the code but it's seems I must install amplify cli and use commands "amplify add auth" and "amplify pull" to work with your example...
where I'm wrong?
Hi Edoardo, you don't need Amplity to make this example. Did something not work?
This is the error I receive on console when I try to call
"Auth.signIn(user.email, user.password)"
[ERROR] 13:56.48 AuthError - Error: Amplify has not been configured correctly. The configuration object is missing required auth properties. This error is typically caused by one of the following scenarios:
amplify push
after adding auth viaamplify add auth
? See aws-amplify.github.io/docs/js/auth... for more informationDid you configure the userPoolId and userPoolWebClientId parameters in the environment files?
solved... I've changed in camelCase the cognito "Auth" property and this caused the error... I have to insert "eslint-disable" to remove ide warnings...
Amplify.configure({
// eslint-disable-next-line @typescript-eslint/naming-convention
Auth: environment.cognito,
});
Hey. Great post, thanks. I noticed that there's no hook to update app.component isAuthenticated value when you sign in though, so the navbar doesn't update on a successful sign-in.
Maybe could make the authenticationSubject on the cognito service public and do this in the app.component init to keep it updated:
Thanks Matthew
I was getting an error - "amplify AuthClass - No current user" and your solution above fixed it.
Hi Rodrigo, excellent post. I've got an issue, though: using Amply is showing now as deprecated, noticed as I used Amplify.configre(). What solution would you suggest?