Reputation: 10070
Out of curiosity, when I log into a site like StackOverflow via OpenID or similar (Google, Facebook, etc.), I get also logged into the identity provider itself (e.g. Google).
Is there a way that users can log into my site using a third party identity, without being logged into that identity itself?
I'm aware that Google sign-in works differently than others, by using Google Sign-In. I'm interested in a general answer for all the popular login services (Google, Facebook, Twitter, ...) whether they are based on OpenID (2.0), OAuth, or a proprietary solution, e.g.: "With OpenID, that works if you do so-and-so. For Google, that is not possible, because technical reason."
Upvotes: 1
Views: 157
Reputation: 2063
The behavior you describe is possible (and an IDP could easily implement it) but is not desirable for multiple reasons.
I understand the desire that a user shouldn't get signed into IDP as a side effect and you could easily achieve that if you are writing the IDP code or alert the user to sign out of IDP when they are back to your site.
Upvotes: 0
Reputation: 706
OpenID/ OAuth is a general "protocol" that allows a site (e.g. stackoverflow) to reside on an identity provider (e.g. Google) for authentication. This includes a transaction where
Any scheme that does not go through the ID provider's login (step 3), will expose your credentials to a (possibly) untrusted third party (would you wnat stackoverflow to have your google password?)
Step 3 also installs a cookie on your machine which contains your session with Google. It is up to Google (or any ID provider) to consider this session valid for all other uses (Gmail etc) but it is a convenient feature anyway
If you already have an established session with Google, it possibly won't require you to log in again.
Upvotes: 2