Cybersecurity

Single Sign-On and "Sign In With" Buttons

Learn what happens behind a "Sign in with" button, what the other site receives, and when single sign-on helps or hurts your security.

Key takeaways

  • With a sign-in button, you authenticate to the identity provider, and the other site receives a signed token instead of your password.
  • OpenID Connect handles "who is this user", while OAuth 2.0 handles "what may this app access on the user's behalf".
  • Single sign-on reduces password reuse but makes your provider account a single point of failure that needs strong protection.
  • Read the consent screen: basic profile and email are normal, while access to mail, files or contacts deserves real scrutiny.
  • Review connected apps now and then, and remove the ones you no longer use.

When you click "Sign in with" a large provider, the site you're visiting doesn't get your password. It sends you to the provider, you prove who you are there, and the provider sends back a signed statement saying that this person is a particular account. The site trusts that statement and lets you in.

That arrangement is called single sign-on, or SSO. It can make you noticeably safer, and it also concentrates risk in one account. Here's how it works, what gets shared and how to decide when to use it.

The three parties

Every sign-on of this kind involves three roles. You are the user. The identity provider (IdP) holds your account and checks your credentials: a consumer platform, or your employer's directory service. The relying party, sometimes called the service provider or client, is the site or app you want to use.

The relying party and the provider set up a relationship in advance. The app is registered with the provider, receives an identifier, and lists the web addresses the provider is allowed to send users back to. That registration is what stops a random site from asking for responses to be delivered to itself.

What happens when you click the button

The usual web version is the authorization code flow. In plain terms:

A "Sign in with" login, step by step
Your browser The website Identity provider Click the sign-in button 1 Redirect to the provider 2 Includes the app's ID and requested scopes Authenticate and consent 3 Your password or passkey goes only here Redirect back with a short-lived code 4 Deliver the code 5 Exchange code for tokens 6 A direct server-to-server request Signed ID token, maybe an access token 7 Your browser The website Identity provider Click the sign-in button 1 Redirect to the provider 2 Includes the app's ID and requested scopes Authenticate and consent 3 Your password or passkey goes only here Redirect back with a short-lived code 4 Deliver the code 5 Exchange code for tokens 6 A direct server-to- server request Signed ID token, maybe an access token 7

The code that passes through your browser is useless on its own for long: it expires quickly, works once, and the app has to prove it's the one that started the flow. A technique called PKCE (Proof Key for Code Exchange, RFC 7636) binds the code to the original request so that someone who intercepts it can't redeem it.

After checking the token's signature, intended audience and expiry, the website creates its own session for you, normally with a cookie. From then on you're signed in to that site until its session ends.

OAuth, OpenID Connect and SAML

These names get mixed together, so it helps to separate them.

Protocol Question it answers Typical place
OAuth 2.0 (RFC 6749) May this app access something for the user? Apps connecting to calendars, files, APIs
OpenID Connect Who is the user? Consumer sign-in buttons, many business apps
SAML 2.0 Who is the user, as asserted in XML? Long-established workplace SSO

OAuth by itself is about delegated access. It gives an app a token for certain actions without giving it your password. OpenID Connect adds an identity layer on top, centered on the ID token, which is a JSON Web Token carrying claims such as the issuer, a stable subject identifier, the audience and the expiry. SAML solves a similar identity problem with signed XML documents called assertions.

If you build software, API keys, tokens and OAuth goes further into how these credentials differ.

What the site actually learns

The consent screen lists what the app is asking for. These permissions are called scopes. A basic sign-in typically shares a stable identifier, your name, your email address and sometimes a profile picture. Some providers let you hide your real address behind a relay address that forwards mail, which limits cross-site matching. Masked email addresses cover that idea more broadly.

Broader scopes change the picture. An app that asks to read your mail, manage your files or see your contacts is asking for ongoing access to your data, which can continue after you close the tab. Malicious apps exploit exactly this: they don't need your password if you grant them access. See consent phishing.

The provider learns something too: which services you sign in to, and roughly when. Whether that matters depends on your comfort with one company seeing that pattern.

The security case for using it

Single sign-on has real strengths.

  • Fewer passwords. The website never creates a password for you, so there's nothing for it to leak or for you to reuse.
  • Better authentication. Your large provider likely supports passkeys, security keys and unusual-activity alerts that a small site can't build well.
  • Faster shutoff. Disable the provider account or revoke one app, and that access can be cut from one place.
  • Less friction. People who aren't asked to invent yet another password are less likely to pick a bad one.

For a small website you don't know much about, signing in through a well-protected account is often safer than handing it a password.

The case against

The same concentration cuts the other way.

  • One account, many doors. Someone who takes over your provider account may reach every site linked to it.
  • Lockout spreads. If the provider suspends or closes your account, you can lose access elsewhere, sometimes with little recourse.
  • Dependence. If the provider has an outage, dependent sign-ins can fail with it.
  • Linkability. The same identity across services makes your activity easier to connect.
Sign-in button or separate password?
Use the sign-in button Your provider account has a passkey or security key The site is minor and you don't want to give it a password The requested scopes are only basic profile and email Losing access would be a nuisance, not a disaster Create a separate login The account holds money, records or irreplaceable work You want it to survive a problem with the provider You prefer not to link this activity to your main identity You use a password manager, so uniqueness is easy VS Use the sign-in button Your provider account has a passkey or security key The site is minor and you don't want to give it a password The requested scopes are only basic profile and email Losing access would be a nuisance, not a disaster Create a separate login The account holds money, records or irreplaceable work You want it to survive a problem with the provider You prefer not to link this activity to your main identity You use a password manager, so uniqueness is easy

Protect the account at the center

If you rely on sign-in buttons, treat the provider account as critical infrastructure. Give it a unique password or, better, a passkey. Add a phishing-resistant second factor, check its recovery methods as described in account recovery, the weak back door, and store backup codes offline.

Watch for imitation. A fake page can show a button that opens a convincing copy of the provider's sign-in window, sometimes drawn entirely inside the web page. Check that the window is a real browser window with the correct domain in its address bar. A password manager helps because it won't fill on the wrong domain, and a passkey won't work there at all.

Clean up connected apps

Your provider's security settings include a list of third-party apps and sites with access. Open it a couple of times a year.

  1. Remove anything you don't recognize or no longer use.
  2. Look closely at apps holding access to mail, files, calendars or contacts.
  3. Check which ones show recent activity.
  4. After removing an app, remember that data it already copied stays with that company; use its own account deletion process if you want it gone.

Removing a connection may also mean you can't sign in to that site anymore. Before you cut a link to an account you care about, check whether the site lets you add a password or another method first.

Mistakes people make with sign-in buttons

The most common problem is forgetting which button you used. Sign in with a different provider, or type your email into the ordinary form, and some sites create a second empty account. Your history, purchases or saved work then seem to vanish. A note in your password manager saying "signs in with this provider" prevents the confusion, and many managers can record that for you.

A second problem is approving whatever appears. A consent screen is a request, and you can decline it. Check the app's name, the publisher shown by the provider and the list of permissions. Be wary of a request for broad access from an app that has no reason to need it, such as a quiz that wants your contacts, or an unexpected link that opens a permission screen out of nowhere.

A third is assuming the button vouches for the site. The provider confirms who you are to the website. It doesn't certify that the website is honest, handles data well or is what it claims to be. Judge the site on its own merits before you send it anything, including your name and email address.

SSO at work and school

Organizations use SSO so that one managed identity opens the whole toolset. Administrators can require strong factors, block sign-ins from unmanaged devices and disable a departing person's access in one step. Many pair it with provisioning, often using a standard called SCIM, that creates and removes accounts in each application automatically.

Two gaps are worth knowing. An app session that's already open may continue after the central account is disabled, until the app's own session or token expires. And some apps still allow a separate local password alongside SSO, which quietly bypasses the central controls. Administrators should look for both. This identity-first approach is a building block of zero trust networking.

Don't use a work or school identity for personal sites. When you leave, you lose the account and whatever depends on it.

Common questions

Can the website see my provider password?

No, if the flow is genuine, because you type it only on the provider's own page. A fake page can capture it, which is why the address bar matters.

If I change my provider password, am I signed out everywhere?

Not necessarily. Each site keeps its own session, and previously granted app access may persist. Use the provider's session and connected-app controls, and sign out on the individual sites if you're responding to a compromise.

Is signing in this way the same as a passkey?

They solve different problems. A passkey is a way to authenticate to one service with a cryptographic key. SSO is a way for one service to vouch for you to others. You can use a passkey to sign in to your provider and get the benefits of both. See passkeys explained.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Cybersecurity →

Latest news on this topic