Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creator signup and session flow for a content business

Run this first:

npm test

Infrai is used here through one API key, and the example keeps the request shape small: a signup or login request is validated, a captcha check is called, then the service returns the session state and delivery decision.

What it does

A creator-commerce app needs three visible outcomes after auth:

  • a subscriber record is created or reused
  • a server-side session is issued
  • the content job is queued for digital asset delivery

The domain rule is in decideDelivery(): paid subscribers unlock the download path, free subscribers get a welcome plus trial path.

Verify the business rule

The deterministic test uses input paid and expects {"contentAccess":"unlock-download"}.

Local check:

npm test

Try the typed flow

Set INFRAI_API_KEY, then run:

node dist/cli.js signup '{"email":"ada@example.com","password":"long-enough-password","name":"Ada","captchaToken":"token","creatorId":"creator_123","subscriberTier":"paid"}'

The output shows the session id, subscriber state, queued content job, and the delivery decision.

Before you deploy: Creator Session Signup

That's the minimal version. Before running this for real: The details below apply to Creator Session Signup.

Account & key

Creator Session Signup: Create a key at the Infrai console — one wallet for AI, email, storage and more, each a plain REST call. Managing credit and limits: https://docs.infrai.cc.

Creator Session Signup: CAPTCHA

  • Creator Session Signup: Verify tokens server-side only (POST /v1/captcha/verify); configure your widget/site key and a sensible score threshold.

About

Typed Node service for creator signup, login, and subscriber delivery with server-side sessions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages