Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
paths: - "backend/app//ApiKey/*" - "backend/app//ApiKey.php" - "backend/app/Services/Domain/Auth/AuthUserService.php" - "backend/app/Http/Middleware/" - "backend/routes/api.php" - "backend/config/sanctum.php" - "backend/tests/Feature/Http/ApiKeys/" - "frontend/src/components/routes/settings/ApiKeys/" - "frontend/src/components/routes/settings/ApiReference/**" - "e2e/tests/account/api-keys.spec.ts"
API keys
- API keys are Sanctum personal access tokens owned by a user and scoped to one account (
personal_access_tokens.account_id). A key acts as that member: their role, grants and permission overrides apply, and it can never do more. Read-only keys carry only thereadability;EnforceAccountUserAccessblocks their writes withAPI_KEY_READ_ONLY(exports and previews marked#[AllowedForReadOnlyUsers]stay open). - Signed-in routes live in two groups.
auth:api,sanctumaccepts keys;auth:apiis session-only: auth, profile and sign-in security, team, account settings and security, payouts (Stripe Connect, terminal readers, VAT) and API key management. A new route that changes who can sign in, team membership, money destinations or account security goes in the session-only group;ApiKeyRouteExposureTestsnapshots that group, and noMANAGE_TEAM,MANAGE_ACCOUNTorMANAGE_PAYMENTSaction may accept keys. - Never read JWT claims with
Auth::payload()on a route keys can reach: it throws under the Sanctum guard. UseAuthUserService(getAuthenticatedAccountId,isImpersonating,getSessionTokenId,logout). The access cache key for a key request isapi-key:{id}. - A key works only while its owner is an ACTIVE member of its account (Sanctum
authenticateAccessTokensUsinginAppServiceProvider); deactivating a member deletes their keys, and so does everyUserSessionRevocationServicecall (password reset, SSO link changes, enforcement), because a key must never outlive a credential reset. Revocations driven by one account's SSO settings pass that account id, so only its keys go. A voluntary password change or turning 2FA off keeps keys on purpose (as GitHub and Stripe do); the key-created email tells the owner to revoke a key they didn't create. The account's 2FA requirement and pending deletion also block keys. - Only the SHA-256 hash and the last four characters are stored; the plain key is returned once, on create. Creating a key needs a verified email and
IdentityConfirmationService, is refused while impersonating, and is capped atMAX_ACTIVE_KEYS_PER_MEMBER. Key names are restricted to a markdown-safe character set because they appear in emails. - The in-app API reference (
/settings/api-keys/reference) renders the committedresources/api-reference/openapi.jsonwith Scalar, themed throughscalarTheme.ts. Keep Scalar's AI agent, MCP and telemetry switched off, and load it client-only (it toucheswindowon import).