Choose Your Integration Pattern

The three ways to integrate Hawcx sign-in, and how to tell which redirect flow you are on.

There are three ways an app signs users in with Hawcx. They look similar — each can involve a "redirect to a Hawcx page and come back with a code" — but they are distinct, and the docs for each live in different places. Pick your pattern first; the rest of the docs follow from it.

The three patterns

These aren't mutually exclusive. A common shape is the SDK-embedded pattern with social sign-in enabled — the SDK runs your primary flow and hands off to the hosted screen only when the user picks a social provider.

Which redirect flow am I using?

All three can bounce the browser to a Hawcx page and back with a code. What differs is who starts the redirect and who exchanges the code:

You are usingThe redirect is triggered byWho exchanges the codeReference
SDK-embedded with social/SSO enabledthe SDK, as a redirect step (window.location.href = step.url)the SDK resumes the flow on return; your backend then exchanges the resulting authCode (PKCE)Web API reference → redirect step
Hawcx-hosted / SSO (OIDC)your app, sending the user to GET /authorizeyour backend, via POST /oauth2/token (OIDC token endpoint)SSO → OIDC
Social sign-inthe hosted screen, brokering the provider on top of the OIDC flowsame as the OIDC flow aboveSocial Connect

They use different return mechanisms

The SDK's redirect step is not the OIDC /oauth2/token flow. If you built on the SDK (@hawcx/core) and later enable Social/SSO, handle the redirect step in your step renderer (navigate to step.url) — don't try to call the OIDC token endpoint yourself. Conversely, if you are an OIDC relying party, follow the OIDC flow end to end and don't reach for the SDK's step machine.

Not sure which one you want?

  • Building auth inside your app's own screens? → SDK-embedded. Start with the 5-Minute Integration.
  • Want a hosted login page or SSO across multiple apps? → Hawcx-hosted / OIDC. See SSO → OIDC.
  • Want "Continue with Google" and similar? → Social sign-in. See Social Connect.

Last updated on