Skip to main content
1-Visitor
May 4, 2020
Question

Application key deleting automatically on reset password

  • May 4, 2020
  • 1 reply
  • 1264 views

Hi,

 

   I am generating an app key using service every time when reset password requested. Currently after password reset successful generated app key is deleting automatically. How to handle this ?    

This behavior is different from running the service with in Thingworx and running service from external call to Thingworx

 

Thanks in advance

 

Vamsi

1 reply

Support
May 5, 2020

Hi @VamsiN.

 

How are you calling the service when this behavior occurs?   Please provide your code.

 

Regards.

 

--Sharon

VamsiN1-VisitorAuthor
1-Visitor
May 5, 2020

I am calling the thingworx service from outside and creating the app key against the user.  Below code I am using to create app key.

var tokenName = 'RestPwd-' + generateGUID();
Resources["EntityServices"].CreateApplicationKey({name:tokenName ,user: userName });
var tokenValue = ApplicationKeys[tokenName].GetKeyID();

 Once Created I am just validating and performing the reset operation.

Support
May 8, 2020

Hi @VamsiN.

 

We're not understanding your use case.  Why is it necessary to create a new appKey on password reset?

 

Please provide further details and we'll try to help.

 

Regards.

 

--Sharon