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.

Auth.forgotPasswordSubmit returns undefined in Nuxt Vue

See original GitHub issue

Auth.forgotPasswordSubmit returns undefined when you call this function. When I looked at the documentation AWS-Amplify Authentication, I saw this code and it returns data.

Auth.forgotPasswordSubmit(username, code, new_password)
    .then(data => console.log(data))
    .catch(err => console.log(err));

But when I run my code, it returns undefined. I noticed that the password has changed even though this code returns undefined. I am not sure is it a feature or bug 😄

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
medelman17commented, Jun 4, 2021

@chrisbonifacio – Rather than include console.log("password reset") etc, let’s remove all of the then bits in docs from auth APIs that do not return data. Thus, the above would look like:

Auth.forgotPasswordSubmit(username, code, new_password).catch((err) => console.log(err));

Can you validate which of the bits return data and which (in addition to the forgotPasswordSubmmit) do not and need to be changed in a PR?

1reaction
mauerbaccommented, May 19, 2021

@medelman17 , could you take a quick look and confirm the docs are ok?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS-Amplify Getting undefined in Auth.forgotPasswordSubmit ...
When i use Auth.forgotPasswordSubmit(username,verificationCode,newPassword) my new password is successfully changed but in response i am ...
Read more >
Authentication Forgot Password Submit amplify-js - Laracasts
Authentication Forgot Password Submit amplify-js. What is the expected response? Auth.forgotPassword() is sending the email with the code.
Read more >
Authentication - Password & user management - JavaScript
Retrieve current authenticated user​​ This method can be used to check if a user is logged in when the page is loaded. It...
Read more >
vue.js - Issue with nuxt/auth - Stack Overflow
For auth I do use nuxt-auth, when the login is successful, I want to redirect to the main page using this.$router.push('/') , then...
Read more >
On this page - Nuxt Auth
user. This object contains details about authenticated user such as name. You can access it using either $auth or Vuex.
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