SDKs
Browser
Section titled “Browser”| Package | Description | Repo |
|---|---|---|
@authn-sh/sdk-js | Vanilla TS client + state machines for sign-in / sign-up / sessions. | authn-sh/javascript |
@authn-sh/sdk-react | React provider + drop-in components (<SignIn />, <UserButton />, …). | authn-sh/javascript |
@authn-sh/ui | Design primitives (Button, Input, Avatar, …) shared between SDK surfaces. | authn-sh/javascript |
Server
Section titled “Server”| Package | Description | Repo |
|---|---|---|
authn-sh/sdk-php | PHP backend SDK + Laravel package, BAPI client, JWT + webhook verifiers. | authn-sh/sdk-php |
Other languages (Go, Python, Ruby) are on the v0.4+ roadmap. v0.1 ships JS + PHP.
v0.4 additions
Section titled “v0.4 additions”@authn-sh/sdk-react gains:
<SocialButtons />,<PhoneNumberField />,<ConnectedAccountsPanel />— see Connected-accounts components.useExternalAccounts(),usePhoneNumbers()hooks.User.createPhoneNumber(),User.getExternalAccounts()helpers.
@authn-sh/sdk-js gains:
SignIn.authenticateWithRedirect({ strategy, redirectUrl, redirectUrlComplete })— drives the OAuth first-factor flow.Authn.handleRedirectCallback()— completes the round-trip after the IdP bounces the browser back.PhoneNumberandExternalAccountresource classes with the toggle / verify / unlink helpers.
authn-sh/sdk-php gains:
OauthProvidersManager,PhoneNumbersManager,ExternalAccountsManager,SmsTemplatesManagerBAPI clients.VerifiedClaims->hasVerifiedPhoneNumber(),getDefaultSecondFactor(),hasMfa()— see JWT claims.
authn-sh/sdk-php-laravel gains:
@authnHasConnectedAccount('google')Blade directive.RequiresConnectedAccountmiddleware.
Custom integrations
Section titled “Custom integrations”The two extension points that don’t need an SDK:
- Verify JWTs in a backend — JWKS + RS256 with any standard library.
- Verify webhook signatures — HMAC-SHA256 of
id.timestamp.body.