Single sign-on with Okta
Connect an Enterprise organisation to Okta with OpenID Connect or SAML 2.0. Prove your email domain in Plotwork first, as the single sign-on guide describes.
TL;DR
| Plotwork field | Where it comes from in Okta |
|---|---|
| Issuer URL | Your Okta domain, such as https://acme.okta.com. With a custom authorization server, its issuer, such as https://acme.okta.com/oauth2/default. |
| Client ID | The app's General tab, Client Credentials, Client ID |
| Client secret | The app's General tab, Client Credentials, the secret under Client secrets |
| Or no secret: a private key JWT | Client authentication Public key / Private key, with the JWKS URL Plotwork shows. See Use a private key JWT. |
| Redirect URI to give Okta | https://api.plotwork.dev/auth/sso/callback |
| SAML: Single sign-on URL and Audience URI to give Okta | The ACS URL and the Entity ID on Plotwork's Single sign-on tab |
| SAML: Metadata URL | The app's Sign On tab, SAML Signing Certificates, the Metadata URL |
1. Create the app integration
- In the Okta Admin Console, open Applications, then Applications, and press Create App Integration.
- Choose OIDC - OpenID Connect as the sign-in method and Web Application as the application type, then press Next.
- Fill in the form:
| Okta field | Value |
|---|---|
| App integration name | Plotwork |
| Grant type | Authorization Code only |
| Sign-in redirect URIs | https://api.plotwork.dev/auth/sso/callback |
| Sign-out redirect URIs | Leave empty |
| Controlled access | The groups that should be able to sign in to Plotwork |
- Press Save.
2. Copy the values into Plotwork
- On the app's General tab, under Client Credentials, check that Client authentication is Client secret. You can also tick Require PKCE as additional verification: Plotwork always sends it.
- Copy the Client ID, and the secret under Client secrets.
- In Plotwork, open your organisation's Single sign-on tab and fill in Identity provider:
| Plotwork field | Value |
|---|---|
| Issuer URL | https://<your Okta domain>, the address you sign in to the Admin Console with, without -admin |
| Client ID | The Client ID you copied |
| Credential | Client secret |
| Client secret | The secret you copied |
- Press Save provider, then turn on Sign in with single sign-on.
3. Check the address claim
Plotwork reads the email claim of the ID token, and refuses it when email_verified is false. Okta sends both when the app asks for the email scope, which Plotwork does. The address must be on a domain you verified in Plotwork: a person whose Okta address is on another domain is refused, and the failure is recorded.
Use a private key JWT (no secret)
Instead of a client secret, Okta can check a short JWT that Plotwork signs at each sign-in with a key it keeps for your organisation. Okta holds only the public key, so there is no secret to copy or renew. This is the private_key_jwt client authentication of OpenID Connect (Okta's client authentication reference (opens in a new tab)). The same steps work at Auth0, Ping and any provider that takes private_key_jwt.
- Create the app integration as in step 1.
- In Plotwork, under Identity provider, fill in the Issuer URL and the Client ID, choose Private key JWT under Credential, and press Save provider. Plotwork makes the signing key and shows the JWKS URL, the public key and its key ID, each with a copy button.
- In the Okta Admin Console, on the app's General tab, under Client Credentials, press Edit and set Client authentication to Public key / Private key.
- Under Public keys, choose Use a URL to fetch keys dynamically and paste the JWKS URL from Plotwork. Or choose Save keys in Okta and add the public key Plotwork shows; you then paste the new one after each rotation.
- Press Save, then turn on Sign in with single sign-on in Plotwork and try it.
What Plotwork sends at each sign-in, as Okta expects:
| Claim | Value |
|---|---|
iss and sub | The app's Client ID |
aud | Okta's token endpoint, as the issuer's discovery document names it, such as https://acme.okta.com/oauth2/v1/token |
exp | Five minutes after it was made |
jti | New for every sign-in, so Okta refuses one used twice |
| Signature | RS256, the key named by kid in the header |
Rotate key, under Signing key in Plotwork, makes a new key at once and keeps the old public key published for a day. With Use a URL to fetch keys dynamically, Okta reads the new key by itself. With a saved key, add the new one in Okta before the next sign-in.
Or connect with SAML 2.0
- In the Okta Admin Console, open Applications, then Applications, press Create App Integration, choose SAML 2.0, and press Next.
- Name the app
Plotworkand press Next. - In Plotwork's Single sign-on tab, choose SAML 2.0 under Identity provider, then fill in Okta's Configure SAML step from it:
| Okta field | Value |
|---|---|
| Single sign-on URL | The ACS URL from Plotwork. Leave Use this for Recipient URL and Destination URL ticked. |
| Audience URI (SP Entity ID) | The Entity ID from Plotwork |
| Name ID format | EmailAddress |
| Application username | |
| Response | Signed |
| Assertion Signature | Signed |
| Signature Algorithm | RSA_SHA256 |
| Assertion Encryption | Unencrypted |
- Press Next, then Finish. On the app's Sign On tab, under SAML Signing Certificates, copy the Metadata URL of the active certificate.
- In Plotwork, paste it under Metadata URL, leave Email attribute empty, and press Save provider. Then turn on Sign in with single sign-on.
- Assign the people or groups who should sign in on the app's Assignments tab.
People start from Plotwork's sign-in page. Starting from the Plotwork tile on the Okta dashboard is refused, because Plotwork accepts only sign-ins it started; hide the tile under the app's General tab, App Settings, Do not display application icon to users.
Provisioning with SCIM
Okta can also add, update and deactivate your members, and push the groups that decide their roles, from the same app integration. SCIM with Okta has every step: the SCIM connector base URL and token from Plotwork, the To App settings, assigning people, pushing groups, and mapping groups to roles.
Troubleshooting
| What you see | What to check |
|---|---|
| "The issuer could not be used: the document names a different issuer" | Use the issuer exactly as https://<your Okta domain>/.well-known/openid-configuration writes it, with or without /oauth2/default. |
| "Your identity provider did not sign you in" | The person is not assigned to the app. Add them, or their group, under Assignments. |
| "Your identity provider sent a sign-in Plotwork could not trust" | The Client ID in Plotwork is not this app's, or the issuer belongs to another authorization server. For SAML: the Single sign-on URL or the Audience URI is not Plotwork's, Assertion Encryption is on, or Okta rotated its certificate; save the provider again with the same Metadata URL. |
| Okta says a user could not be created: the address is not on a verified domain | The person's Okta username is on a domain you have not verified in Plotwork. Verify it, or change the username. |
| With a private key JWT, "Your identity provider could not be reached or answered something unexpected" | Okta refused Plotwork's assertion. Check that Client authentication is Public key / Private key and that the JWKS URL is Plotwork's for your organisation. With a saved key, the key may be from before a rotation: add the current one. Okta's System Log shows the reason. |
| "The link has expired or was opened in another browser" after the Okta dashboard | The person started from the Okta tile. Start from Plotwork's sign-in page instead. |
See also
| Page | Why |
|---|---|
| Single sign-on | Domains, the switches, Require single sign-on and the way back in |
| SCIM with Okta | Adding and deactivating members from Okta, with roles by pushed group |
| Single sign-on with Microsoft Entra ID | The same for Microsoft Entra ID, with a federated credential instead of a secret |
| Single sign-on with Google Workspace | The same for Google Workspace |