Sign in with Facebook through allauth headless

Open
#178 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
django, python

Research direction

Start with the social login setup in dependent issue #176, then check which token the Expo Facebook SDK returns and whether allauth 65.x accepts it; record the answer before building. Implement the browser redirect and app token flows, keeping Facebook email unverified and separate from matching existing Accounts. Add the listed signup and login tests, verify Facebook is absent from headless /config when credentials are empty, and document the Meta setup and data deletion URL.

Written by the indexing model from the issue text.

Description

area:auth area:security enhancement priority:p2 size:S

Problem: Some players, often those who find leagues and clubs through Facebook groups, would rather sign in with Facebook than create a password.

Scope:

  • Enable allauth.socialaccount.providers.facebook on top of the social login setup from #176
  • Redirect flow for the browser client
  • Token flow for the app client. Check which token the Facebook SDK in the Expo app returns (an access token from classic login, or an OIDC token from Limited Login on iOS) and whether allauth 65.x accepts it, and record the answer here before building
  • Request only email and public_profile
  • Treat a Facebook email as unverified: no email authentication and no VERIFIED_EMAIL for Facebook. A Facebook signup verifies its email through OPEN's own email verification, and a Facebook login never signs in to an existing Account by email
  • Handle a Facebook account with no email address: the signup asks for one and verifies it
  • Meta requires a data deletion callback or instructions URL. Point it at OPEN's account deletion instructions (#116), or add a signed data deletion callback if that is required
  • App id and secret from environment variables, with placeholders in .env.example. Use appsecret_proof on Graph API calls
  • Document the Meta developer setup: app type, valid OAuth redirect URI (the backend's /accounts/facebook/login/callback/), data deletion URL, and app review for email
  • Tests: signup, login, a Facebook email that matches an existing Account, and a Facebook account with no email

Acceptance criteria:

  • A new player can sign up with Facebook from the web and from the Expo app, and must verify their email before the Account is active
  • A Facebook login whose email matches an existing Account never signs in to that Account
  • The Meta app has a data deletion URL that works
  • With the Facebook variables empty, Facebook does not appear in the headless /config provider list

Out of scope:

  • The web and Expo screens (app repository issues)
  • Any Facebook API beyond sign-in, such as friends, groups, or pages

Depends on: #176

Related: #116 (Account deletion)

Size: S

Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.