Password reset in AppStudio app

343
2
06-24-2022 05:35 PM
GeneVaatveit
New Contributor

My qml AppStudio app supports users entering their agol username and password in order to log in before proceeding.  I would like to add functionality to reset a forgotten password, but I can't figure out how to do that.  Is there an API for this accessible from qml?

0 Kudos
2 Replies
TrevorFrame
Esri Contributor

Hi @GeneVaatveit, 

If you don't mind not having a custom login setup you can take a look at the sample "Portal User Info", you'll see it uses the Runtime Toolkit AuthenticationView{} component which ultimately uses a WebView for an AGOL login box that allows the user to choose "Forgot username?" or, "Forgot password?". Otherwise, it looks like there is a REST API for update user that can update passwords but only for arcgis identity provider.

Screen Shot 2022-06-28 at 1.53.53 PM.png

 

0 Kudos
GeneVaatveit
New Contributor

Actually my client DOES mind not having a custom login setup.  I have tried the Portal User Info sample, but it is quite opaque about what is happening behind the scenes.  What API is the Forgot password? link using when clicked?  It generates an e-mail containing the following link:

https://www.arcgis.com/sharing/rest/oauth2/reset?id=UkvVoYEGJ4mxMKBQ

However when looking at the REST API reference I can't find any mention of the reset operation, or how to generate the associated id.

0 Kudos