AddThisFeature

Social Sign-In

Let users sign in with an identity they already have.

involved User Accounts

What it adds

OAuth used as authentication: first-time account creation from a provider identity, safe matching to existing accounts, and handling providers that return incomplete or unverified data.

What your agent is told to do

5
  1. 1

    Key the account on the provider's stable subject identifier, not on the email address. Emails change hands; subject IDs do not.

  2. 2

    Only auto-link to an existing account when the provider asserts the email is verified. An unverified email from a provider is an account-takeover route — send those users through an ownership check instead.

  3. 3

    Request the minimum scopes needed to identify someone. Sign-in does not need calendar or contact access.

  4. 4

    Handle missing profile fields as normal: many providers return no name, no avatar, and some return no email at all. Do not block account creation on data you cannot guarantee.

  5. 5

    Adding or removing a sign-in method on an already-authenticated account is owned by Account Linking, and OAuth for data access is owned by OAuth Integration Connections. Extend those rather than duplicating them here.

Edge cases it handles

6
  • A user who revoked access at the provider must get a clear reconnect prompt, not a generic failure, and must still be able to sign in another way.
  • Two providers returning the same email must not silently become two accounts — or one account, without an explicit decision.
  • The provider changing a user's email must not orphan the account or create a duplicate.
  • A cancelled or denied consent screen returns an error, not a crash; land the user back on sign-in with an explanation.
  • State must be validated on the callback, and the returned state must match a value tied to the originating session.
  • The first sign-in for a brand-new user must still complete any required onboarding, not drop them into a half-configured account.

Definition of done

8
  • Accounts are keyed on the provider subject identifier.
  • Auto-linking happens only for provider-verified email addresses.
  • Only identity scopes are requested.
  • Missing name, avatar, or email does not block account creation.
  • Denied consent and revoked access produce clear, recoverable states.
  • The callback rejects mismatched or missing state.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.