Identity Manager - What do I need?

631
3
06-17-2014 06:35 AM
williamcarr
Occasional Contributor II
Greetings,

I have a dashboard that contains links to a series of secure service web maps(that open in a new tab). Ideally, I would like the user to be able to log into a secured service on the dashboard then access the links without having to re-enter their credentials.

Call me insane or delusional, but early in my JS experience(2 months ago) I could swear I achieved this by accident. I've checked a number of the posts on the forums but I haven't seen anything that looks familiar.

Any ideas, links, comments on how to achieve this are definitely appreciated.

Thanks.
0 Kudos
3 Replies
ReneRubalcava
Frequent Contributor
I thought tabs shared sessions, so if a user was logged in via a session, it should persist across tabs. That's odd.
You could try storing the credentials yourself. There is a sample up that shows how using cookies or localStorage.
https://developers.arcgis.com/javascript/jssamples/widget_identitymanager_client_side.html

That might help you manage it a little better.
0 Kudos
williamcarr
Occasional Contributor II
I thought the same thing but

   document.getElementById('open06').onclick = function() {
    window.open('url to web map');   
}; 


must start a new one.

I checked that link, it seems like more than I would have been able to do 2 months ago, yet (and I could be wrong) it was producing this wanted effect.

I think it was https://developers.arcgis.com/javascript/jssamples/widget_identitymanager.html , because around that time I was experimenting the editor functions. Then again who knows what I was doing at that time.
0 Kudos
williamcarr
Occasional Contributor II
After a little digging I have confirmed that yes, I was delusional. On the flip side that link was just what I needed. I take it that I will have to include the  loadCredentials(); to the linked web map?
0 Kudos