* Which Category is your question related to? *
It is related to the Auth module
* What AWS Services are you utilizing? *
Cognito and Identity Pool
* Provide additional details e.g. code snippets *
This is my scenario:
User is not confirmed.Auth.verifyCurrentUserAttribute({ email: "email@address" })
seems to return an error saying No current user. My guess is that this method is to be used only once the user has been logged in. In my scenario, how can they proceed to confirm their email address if they missed confirming it during registration?
@callmekatootie I believe Auth.verifyCurrentUserAttribute is used to verify and attribute or attributes for a user who has already been confirmed in the signup process. Instead, try calling Auth.confirmSignUp like so:
Auth.confirmSignUp(username, code)
.then(() => {
// do something...
})
.catch(err => yourErrorHandler(err));
Whether or not you need to have them proceed to confirm their email address after this depends on your configuration.
I'm closing this for now, but please feel free to reopen if this doesn't address your issue.
I am not getting the option to reopen this ticket. But I get a feeling that what I am looking for is not currently supported
The issue with the solution that you have proposed is that Auth.confirmSignUp() expects the code - correct me if I am wrong, but doesn't the code expire after a period of time - Also, what I am looking at is sending the confirmation code through email once more (say the user accidentally deleted it or it got caught by their spam filter and they are unaware about it and would like to get the confirmation code once again). I could not determine if the ability to send the confirmation code again exists, if the user has come out of the registration page...
Just hit this and landed here. here's the solution:
Auth.verifyCurrentUserAttribute('email').then((data) => {
// do something
.catch(err =>{
//handle err
}
It'll send you a code. Then use is it in
Auth.verifyCurrentUserAttributeSubmit('email', this.code).then ....
Most helpful comment
I am not getting the option to reopen this ticket. But I get a feeling that what I am looking for is not currently supported
The issue with the solution that you have proposed is that
Auth.confirmSignUp()expects the code - correct me if I am wrong, but doesn't the code expire after a period of time - Also, what I am looking at is sending the confirmation code through email once more (say the user accidentally deleted it or it got caught by their spam filter and they are unaware about it and would like to get the confirmation code once again). I could not determine if the ability to send the confirmation code again exists, if the user has come out of the registration page...