Disable social logon for portal?

1144
5
Jump to solution
04-25-2017 12:20 PM
NicoleSchmidt
New Contributor III

The ArcGIS javacript api implies that social logins can be disabled (and by default are disabled).

OAuthInfo | API Reference | ArcGIS API for JavaScript 4.3 

However, the property does not seem to change anything.  The "Google" and "Facebook" options are always available on the 

https://www.arcgis.com/sharing/oauth2/authorize popup.

Can these be disabled?  

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

Ok sorry for the confusion on this issue it looks like there was a change in the API and now it is not possible to disable the social logins.  I've submitted an issue to the development team to update the documentation to remove the showSocialLogins property to avoid confusion. 

View solution in original post

5 Replies
KellyHutchins
Esri Frequent Contributor

I just ran a quick test and enabling social logins worked for me. Just keep in mind this caveat from the API Reference. 

"This property is not supported if pointing to an organizational URL. For example, portalUrl: "https://www.arcgis.com" works, whereas portalUrl: "https://orgname.arcgis.com" does not."

To test your sample try running it in an incognito window so it doesn't use any credentials you may already have stored in the browser. 

0 Kudos
NicoleSchmidt
New Contributor III

I get the same behavior in an incognito window, but now I wonder if I am simply misunderstanding what this option is supposed to do. I was hoping it would remove these options from the login screen:

https://www.screencast.com/t/z3GBOii1

This is the code:

var info: __esri.OAuthInfo = new this.OAuthInfo();

0 Kudos
KellyHutchins
Esri Frequent Contributor

There's a sample in the 4.x help that you can use to test the OAuth login. Note that by default it does not have social log-ins enabled. 

Access ArcGIS Online items using OAuthentication | ArcGIS API for JavaScript 4.3 

But if you wanted to add them you'd modify the code as follows: 

      var info = new OAuthInfo({
        // Swap this ID out with registered application ID
        appId: "q244Lb8gDRgWQ8hM",
        showSocialLogins:true,
        popup: false
      });
0 Kudos
NicoleSchmidt
New Contributor III

I am sorry. I feel like I must be missing something here, but when I launch that sample in a new incognito window, I see the social logins displayed.

This is what I see (with the facebook and G+ icons present). Is this what I should see on the default version of this sample?

0 Kudos
KellyHutchins
Esri Frequent Contributor

Ok sorry for the confusion on this issue it looks like there was a change in the API and now it is not possible to disable the social logins.  I've submitted an issue to the development team to update the documentation to remove the showSocialLogins property to avoid confusion.