Skip to content

Meta: login via OAuth2 and Graph profile #17

Description

@ParallelEntrepreneur

Part of #1.

Blocked by: #4 (Spike: Meta as OAuth2 plus Graph profile, and the data deletion callback); #8 (Sessions: issuing, validation, sliding expiry, revocation and logout); Account linking: one user, many identities, and the email-match rules

Problem. Facebook Login is plain OAuth2 with a profile call, implemented on the oauth2 crate as the spike decided.

Proposed approach.

  • GET /meta/start: authorization URL with email public_profile, state in the signed cookie, redirect.
  • GET /meta/callback: state check, code exchange through the HttpClient port, then GET /me?fields=id,name,email; email may be missing and is treated as unverified when present unless Meta documents otherwise.
  • Identity (provider = meta, subject = Graph id, email?, name) handed to the linking rules; session issued.
  • App-scoped user ids are per app; the subject is stored as returned and documented as not portable across Meta apps.

Acceptance criteria

  • Start and callback tested with a fake HttpClient for the token and profile calls, with and without an email
  • State mismatch and a token exchange error both fail cleanly
  • Manual run with a Meta test app in development mode

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authshared authentication serviceneeds-humanrequires an action only the owner can take

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions