Giter Club home page Giter Club logo

Comments (2)

assyadh avatar assyadh commented on May 31, 2024

Calling the UserManager.ResetPasswordAsync(TUser user) Admins reset the password by sending a token (no need to be logged in, this is an Admin operation):

https://github.com/aws/aws-aspnet-cognito-identity-provider/blob/master/src/Amazon.AspNetCore.Identity.Cognito/CognitoUserManager.cs#L294

Calling UserManager.ResetPasswordAsync(TUser user, string token, string newPassword) changes the password using the token retrieved above: (this also does not require to be logged in, the token allows the password to be changed):

https://github.com/aws/aws-aspnet-cognito-identity-provider/blob/master/src/Amazon.AspNetCore.Identity.Cognito/CognitoUserManager.cs#L278

UserManager.ChangePasswordAsync(TUser user, string currentPassword, string newPassword)
just changes the password, you do not have to be logged in, but the user gets logged in as part of the change password to populate the tokens. (The reason is that you may want to change password because you are forced to as part of a Cognito Challenge).

public virtual async Task<IdentityResult> ChangePasswordAsync(TUser user, string currentPassword, string newPassword, CancellationToken cancellationToken)

from aws-aspnet-cognito-identity-provider.

jlwhitfill avatar jlwhitfill commented on May 31, 2024

thanks this worked

from aws-aspnet-cognito-identity-provider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.