Any OpenID Connect library
Configure a standard OpenID Connect client library to sign users in with onefold, with the settings to use and the options to turn off.
onefold is a standard OpenID Connect provider, so a conforming OpenID Connect client library in any language can sign users in. onefold publishes no SDK of its own; you do not need one.
Prerequisites
- An application with a redirect URI registered
- Its client ID, and its client secret unless it is a public client
Settings
Give the library the issuer. It reads the rest from the discovery document.
| Setting | Value |
|---|---|
| Issuer | https://onefold.eitozx.com |
| Discovery document | https://onefold.eitozx.com/.well-known/openid-configuration |
| Response type | code |
| PKCE | On, with S256 |
| Scopes | openid, plus identity and profile as you need |
| Client authentication | client_secret_basic or client_secret_post; none for a public client |
| ID token signing algorithm | RS256 |
If the library asks for endpoints one by one, they are listed in OAuth and OIDC endpoints.
Options to check
Libraries have defaults that suit other providers. Check these.
| Option | What onefold needs |
|---|---|
| PKCE | On, with S256. Some libraries enable PKCE only for public clients; onefold requires it of every client by default. See PKCE. |
| Flow | Authorization code only. Implicit and hybrid flows are not supported. |
| Extra callback parameters | The callback carries iss. Use a library version that accepts it, or allow it explicitly. |
| Sign-out | onefold has no end_session_endpoint. Turn off any option that expects RP-initiated logout. |
| Dynamic client registration | Not supported. Register the application in the developer portal. |
| Userinfo | /o/userinfo/ needs the openid scope |
What the library gives you
After the callback, the library has verified the ID token and exposes its claims. Use sub as
the user's identifier. See Scopes and claims for what each
scope returns.
The library does not manage your application's session. Start your own once the callback succeeds.
When something fails
- An error page on onefold before the user signs in is almost always PKCE or the redirect URI. See Troubleshooting.
invalid_clientat the token endpoint means the client ID or secret is wrong, or a public client sent a secret.
Mobile and desktop
Sign users in to a native mobile or desktop application with onefold as a public client, using the system browser, PKCE and a redirect URI the application can receive.
Protect your API
Verify who is calling your own API using onefold — with userinfo, or with audience-bound JWT access tokens issued for a protected resource you register (RFC 8707).