Maintain app login

2549
3
11-05-2015 09:10 AM
GeorgeOulton1
New Contributor III

Hello

Each time the app is loaded, a fresh login is required. Is there a way to have a users ArcGIS Online and Server login credentials persist for a certain amount of time?

Thanks

George

0 Kudos
3 Replies
GeorgeOulton1
New Contributor III

So I have gotten the OAuth2 to work and store the ArcGIS Online credentials for the registered app. Now is it possible to allow a user to logout? I see with some themes a portal login/logout system is available in the javascript, but none of this initialized when I'm logged in and using the app.

Has anyone implemented a login/logout system for the ArcGIS Online credentials in their app? Please let me know if there are resources that would help me out on this topic.

Thanks

George

BenjaminHarloe
New Contributor II

How were you able to get the login credentials to persist?

0 Kudos
GeorgeOulton1
New Contributor III

If the "appId" is set in the built version of your appbuilder app or in your authInfo parameters for other apps, then the app will automatically use OAuth2 to handle the ArcGIS Online credentials. You can choose to stay signed in at login, otherwise it's session stored credentials.