Is there a way of detecting the type of authentication used by SharePoint from the client browser?
Edit It doesn't have to be via the Client Object Model. If there is a SharePoint JS parameter that tells me this information then even better
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityTry this:
var ctx = new SP.ClientContext();
var user = ctx.get_web().get_currentUser();
ctx.load(user);
ctx.executeQueryAsync(function() {
var loginName = user.get_loginName();
console.log(loginName);
});
Now you shold be able to see the type in the loginName variable.
I'm not 100% sure, but its worth a try.
For example I get i:0#.w|somedomain\user
and i:0#.f|aspnetmembership|otheruser