Skip to content

Feat/account creation hook#363

Open
joshwanf wants to merge 3 commits intomainfrom
feat/account-creation-hook
Open

Feat/account creation hook#363
joshwanf wants to merge 3 commits intomainfrom
feat/account-creation-hook

Conversation

@joshwanf
Copy link
Collaborator

Resolves #273

Create an account action follows this flow:

  1. "Sign up" or "Register with Google" is clicked.
  2. Firebase Auth handles account creation and resolves promise.
  3. .then() calls backend's POST /api/account-hooks with an array of side-effect hooks to run. If Google sign in was used, .then() checks for userCredential.operationType as link or reauthenticate.
  4. Web app layout <ProtectedRoute> checks for an isProvisioningAccount signal to sync loading AFTER backend finishes.

Currently, AccountHookAction is an enum of only "add example screener." A Map connects an AccountHookAction to a function, so new hooks can be added.

@joshwanf joshwanf requested a review from prestoncabe as a code owner March 14, 2026 19:56
@joshwanf joshwanf marked this pull request as draft March 15, 2026 17:21
@joshwanf joshwanf marked this pull request as ready for review March 15, 2026 17:27
@prestoncabe prestoncabe linked an issue Mar 21, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create hook for account creation that adds example screener Example Screener for each new user

1 participant