sgcAuthOAuth2 and JWT,native in Delphi.Passkeys too.
Two components carry the token side of modern authentication into your application. TsgcHTTP_OAuth2_Client runs the Authorization Code, PKCE, Client Credentials, Resource Owner Password and Device Code grants against any OAuth2/OIDC provider. TsgcHTTP_JWT_Client builds, signs and verifies JSON Web Tokens, on its own or as the Bearer token source for your WebSocket and HTTP clients. Standalone, the sgcWebSockets Core runtime is included.
sgcAuth quickstart | sign a JWT, validate it on the server
OAuth2 clientGrant typesWebAuthn passkeys
2Client components, OAuth2 and JWT, on one palette page
9RFCs implemented: OAuth2, PKCE, DPoP, Device Code, JWT/JWS/JWE and more
5Target platforms: Windows, macOS, Linux 64-bit, iOS and Android
1Standalone installer, with the Core runtime inside
100%Source code included with every license
Watch it run
See sgcAuth in two minutes.
JWT, OAuth2 and WebAuthn, on the client side and the server side, from Delphi. Narrated and captioned. Nothing downloads until you press play.
sgcAuth quickstart
Tokens, delegated authorisation and passkeys in one package.
Three ways inJWT when you already know the user, OAuth2 when a third party holds the identity, WebAuthn when there is no password at all.
Sign a JWTSet the algorithm and the secret, fill in the standard claims, then attach the component to a WebSocket or HTTP client as a Bearer token.
Validate it on the serverThe signature, exp and nbf are checked, and a request with a bad token never reaches your handler.
OAuth2 in one componentClient id, provider URLs, scopes and a grant type. It opens the browser and runs the local redirect server for you.
WebAuthn and passkeysRegistration and assertion driven by the server component. The private key never leaves the device.
What is in the pack
One component per job, one API style.
Drop a component on a form, set the provider or key details, wire the events, then call Start or Sign. The naming is consistent across both, so an authentication flow reads the same whichever grant or algorithm it uses.
Every grant type, one component
TsgcHTTP_OAuth2_Client drives OAuth2Options.GrantType through auth2Code for trusted server-side apps, auth2CodePKCE for native, mobile and single-page apps, auth2ClientCredentials for daemons and service accounts, auth2ResourceOwnerPassword, and auth2DeviceCode (RFC 8628) for smart TVs, kiosks and other input-constrained devices.
Start opens the system browser and stands up a small local HTTP server from LocalServerOptions to catch the redirect, exchanging the code for a token over plain HTTPS. Refresh, Revoke and Introspect cover the token lifecycle after that, and DPoPOptions adds proof-of-possession (RFC 9449) for providers that require it.
TsgcHTTP_JWT_Client publishes everything RFC 7519 needs through JWTOptions: the JOSE Header, the registered Payload claims (iss, sub, aud, exp, nbf, iat, jti, plus custom claims), and the key material for HMAC, RSA and ECDSA. Call Sign for the compact-serialization token directly, or set RefreshTokenAfter and let the component re-sign automatically.
The JWT component plugs straight into Authentication.Token.JWT on TsgcWebSocketClient, TsgcHTTP1Client and TsgcHTTP2Client, so every outbound request carries a fresh Bearer token without a line of header code.
Passwordless sign-in is served by TsgcWSAPIServer_WebAuthn, a sgcWebSockets Enterprise/All-Access component built on the patched Indy library that sgcCustomIndy ships as an add-on. It is always included when you order sgcAuth, and so are the TOTP, LDAP, SAML, OpenID Connect and Mail OAuth2 components.
Sign in with Google or Microsoft, server-to-server API access, smart TVs and kiosks, long sessions without re-prompting, and Bearer tokens for your own WebSocket and HTTP APIs. Both components run happily inside a VCL or FMX application, a service or a console process.
Neither component depends on anything beyond the Core runtime's HTTP client stack and the platform's crypto primitives, so both compile and run wherever Delphi does: Windows, macOS, Linux 64-bit, iOS and Android. From Delphi 7 through RAD Studio 13 and on C++ Builder.
sgcAuth speaks the published OAuth2/OIDC and JWT/JWS standards rather than wrapping a vendor SDK, so the provider is your choice: Google, Microsoft, Auth0, Okta, Keycloak, or any RFC-compliant authorization server. Ready-made Google and Microsoft presets configure the common endpoints and scopes for you.
sgcAuth is a standalone package. It bundles the sgcWebSockets Core runtime it is built on, and every license ships with full source code, so the token exchanges step through in your own debugger. Deployment is royalty-free.
Drop a component on a formTsgcHTTP_OAuth2_Client and TsgcHTTP_JWT_Client sit on one palette page.
Set the provider or the keyAuthorization and token URLs, client id and scopes for OAuth2. Algorithm, secret or key pair and claims for JWT.
Wire the eventsOnAfterAccessToken hands you the token, and the refresh, revoke and introspect calls follow the same pattern.
Call Start or SignOr hand the JWT component to a WebSocket or HTTP client and let it attach a fresh Bearer token to every request.
A closer look
Three ways in, one package.
Frames from the sgcAuth quickstart video.
Signed on the client, checked on the server.
The JWT client signs with HMAC, RSA or ECDSA and rides along as an Authorization: Bearer header. On the other side the signature is checked against the same secret or public key, expired and not-yet-valid tokens are rejected, and a request with a bad token never reaches your handler.
Pick the grant that fits the app.
Authorization Code for web apps with a back end, PKCE for native and mobile apps, Client Credentials for machine to machine, Device Code for TVs and consoles. Refresh, revocation, introspection and DPoP are handled for you as well.
No password, and no shared secret to leak.
The server sends a random challenge, the authenticator signs it with the private key, and the server checks it against the stored public key. A user signs in with a passkey, a fingerprint or a hardware key, and the private key never leaves the device.
Before you buy
Four things worth knowing first.
What sgcAuth needs from you, whether you already own these components, what WebAuthn needs on top, and which IDEs it targets. The answers are short, and they are on this page rather than in the small print.
job component grants / algorithms
OAuth2 TsgcHTTP_OAuth2_ClientCode, PKCE, Client Credentials,Resource Owner Password, Device Code
JWT TsgcHTTP_JWT_ClientHS256/384/512, RS256/384/512, ES256/384/512already own it?
Both the OAuth2 Client and the JWT Client ship inside
sgcWebSockets from the Standard edition up.
sgcAuth is for licensing OAuth2 + JWT without a full
sgcWebSockets edition.
sgcAuth is standaloneThe sgcWebSockets Core runtime is included: the HTTP/TLS client stack both components POST their token requests through, and the JSON machinery that parses the responses. One installer, full source code in the box.
Already in your sgcWebSockets edition?Both clients ship inside sgcWebSockets from the Standard edition up. sgcAuth exists for the opposite case: OAuth2 and JWT client support without licensing a full sgcWebSockets edition.
WebAuthn needs sgcCustomIndyTsgcWSAPIServer_WebAuthn is built on the patched Indy library that sgcCustomIndy ships as an add-on. It is always included when you order sgcAuth, and the sgcAuth price shown already covers it.
Delphi and C++ BuildersgcAuth targets Delphi 7 through RAD Studio 13 and C++ Builder. The free trial installer is the sgcWebSockets All-Access trial, so both components can be evaluated today.
Grants, refresh, revocation and signing are all first-class methods and events, and full source code means nothing in between is a black box. Every component and property →
Part of sgcWebSockets
Licensed on its own, or already in your edition.
sgcAuth is one package of the sgcWebSockets family. Buy it standalone with the Core runtime bundled in, or get both clients with any sgcWebSockets edition from Standard up.
sgcAuth
The OAuth2 and JWT clients, standalone, with the sgcWebSockets Core runtime included.
sgcAuth is one of the eSeGeCe component libraries for Delphi, C++ Builder and .NET. They share conventions, they ship with full source, and they deploy royalty-free.