web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Password Reset Token

(0) ShareShare
ReportReport
Posted on by

Hello.

I cannot find this information in the documentation:

When a ADX Portal user attempts to reset his/her password (via LoginController\ForgotPassword), I understand that a unique token is generated as part of the reset process.

Question: How long is the token valid for?

What factors will make the token invalid? (e.g. Another token request? x minutes?)

Thank you!

Steve

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Nadeeja Bomiriya Profile Picture
    6,804 on at

    Hi stevechin1,

    Adxstudio's identity mechanism is built on top of ASP.NET Identity.

    https://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-identity

    The only difference is, instead of AspNetUsers table in SQL Server, it uses Contact entity in CRM.

    For more information, please read below article.

    https://www.asp.net/identity/overview/features-api/account-confirmation-and-password-recovery-with-aspnet-identity

    The default expiration is one day.

    In Areas\Account\Models\IdentityConfig.cs you'll find below code.

    if (dataProtectionProvider != null)
    {
    	manager.UserTokenProvider =
    		new DataProtectorTokenProvider<ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity"));
    }

    You can change the expiration setting using below code.  In below example, token will expire in 3 hours.

     if (dataProtectionProvider != null)
     {
        manager.UserTokenProvider =
           new DataProtectorTokenProvider<ApplicationUser>
              (dataProtectionProvider.Create("ASP.NET Identity"))
              {                    
                 TokenLifespan = TimeSpan.FromHours(3)
              };
     }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans