Skip to main content

Social Login - Sign In with Google, Apple, and More

About 2 min read

Social login is a mechanism that lets you log in to external services using a social media account such as Google, Apple, or Facebook. Users do not need to create a new password and can start using a service easily with their existing account information. Technically, it is based on the OAuth 2.0 and OpenID Connect (OIDC) protocols, and authentication is completed without entrusting a password to the service.

How OAuth 2.0 / OpenID Connect Works

Behind social login, the OAuth 2.0 Authorization Code Flow is at work. When a user presses the "Log in with Google" button, they are first redirected to Google's authentication screen, and once the user grants permission, an authorization code is returned to the service. Using this authorization code, the service obtains from Google an access token and an ID token (defined by OpenID Connect) and receives the user's identifying information (email address, name, and so on). In this flow, the service does not receive the user's password. Password verification takes place on Google's side, and the Google password is not stored in the service's database.

Differences Between Google, Apple, and Facebook Login

Even within the same social login, providers differ in how they handle privacy. With Apple's "Sign in with Apple", if the user chooses a relay feature that hides their email address, the service receives a random address that forwards to the user's personal email. Google login shares your email address and profile information, but the user can finely control the scope (the range of what is shared). As for Facebook login, in the 2018 Cambridge Analytica incident it came to light that user data had been illicitly collected through social login.

The Trade-off Between Convenience and Risk

One benefit of social login is relief from password fatigue. The more services you use day to day — email, shopping, finance, work tools — the more passwords pile up, and unless you use a password manager, this leads to reusing passwords. Social login mitigates this problem but creates a different risk. An example is the excessive granting of permissions. At login you may be asked for unnecessary permissions such as "access to contacts" or "viewing your posts," and granting them carelessly causes your personal information to be shared broadly. Please also refer to the article that explains the risks of OAuth permissions in detail.

Risks When a Social Media Account Is Suspended

With services that depend on social login, there is a danger of losing access in a chain reaction if the social media account is suspended or deleted. Account suspension on social media platforms can happen without warning. While the account is suspended, services accessible only via social login become completely unusable. If the service supports it, setting up an alternative login method using an email address and password after registering with social login avoids this chain reaction. As with single sign-on, this is a design that avoids a single point of failure.

The Privacy Perspective

When you use social login, the social media provider can track which services you log in to and when. This is a form of cross-site tracking and may be used for ad targeting. From the standpoint of privacy regulations such as GDPR, the range of data shared through social login is a point at issue. In the privacy settings guide, you can learn how to manage permissions on each platform. In phishing attacks, there are cases where a fake social login screen is used, and whether the login screen's URL is legitimate is a clue for telling it apart.

Was this article helpful?

Related Terms