Version

Creator sessions

Signing a creator in from a connector's own login door — the one call that turns an account the platform just vouched for into a dashboard session, a second-factor challenge, or the sign-up page.

Subscriby\Connector\Core\CreatorSessions. A connector whose platform can vouch for an account in the browser (an OAuth2 flow, a login widget) offers its own "Continue with …" button on the sign-in pages through the CreatorLoginMethod slot. Its callback hands the account here and acts on the answer; the core finds the creator who holds the account and runs the same login the password form runs, second factor included.

signIn()

$outcome = $sessions->signIn($account->identityRecord(), remember: true);

return match ($outcome) {
    CreatorSignIn::SignedIn => redirect()->intended(route('dashboard.all')),
    CreatorSignIn::ChallengeRequired => redirect()->route('two-factor'),
    CreatorSignIn::Unknown => redirect()->route('register', ['token' => $sealed]),
};

Reads the record's connector and externalId and nothing else, finds the creator who holds that account, and answers one of three things:

  • SignedIn: the session is established, and remember decided whether it outlives the browser.
  • ChallengeRequired: the creator set up a second factor, so they are parked at the challenge page rather than signed in; send them to two-factor.
  • Unknown: no creator holds the account. Nothing is created or linked; the connector sends the visitor to the sign-up page with the account sealed in the token query parameter that page already reads (connector, id, name, nickname, avatar, encrypted with the application key), so the account becomes the new creator's primary identity when the form is submitted.

Nothing is recorded here. A connector adopts the account on its own side before asking, and links it through Identities only when a handshake proves possession; the sign-in itself proves nothing beyond what the platform vouched for, which is why a stranger is answered as unknown rather than linked.

How is this guide?

Last updated on

Version

On this page

Subscriby is a product
designed by you — for you.
No boardroom full of executives deciding what we ships next. Our roadmap always shaped by you with your feedback.

Share feedback or a request

For AI agents: llms.txt · llms-full.txt