This hosts the public key that is used for verifying access tokens.
| curl https://api.workos.com/sso/jwks/client_123456789 |
| import { WorkOS } from '@workos-inc/node'; | |
| const workos = new WorkOS('sk_test_123'); | |
| const jwksUrl = workos.userManagement.getJwksUrl('client_123456789'); |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.key = "sk_example_123456789" | |
| end | |
| jwks_url = WorkOS::UserManagement.get_jwks_url("client_123456789") |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| jwks_url = workos_client.user_management.get_jwks_url() |
| package main | |
| import ( | |
| "github.com/workos/workos-go/v2/pkg/usermanagement" | |
| ) | |
| func main() { | |
| usermanagement.SetAPIKey( | |
| "sk_example_123456789", | |
| ) | |
| jwksUrl, err := usermanagement.GetJWKSURL("client_123456789") | |
| } |
| <?php | |
| WorkOS\WorkOS::setApiKey("sk_example_123456789"); | |
| $userManagement = new WorkOS\UserManagement(); | |
| $jwksUrl = $userManagement->getJwksUrl("client_123456789"); |
| import com.workos.WorkOS; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| String jwksUrl = workos.userManagement.getJwksUrl("client_123456789"); |
| https://api.workos.com/sso/jwks/client_123456789 |
GET/sso /jwks
Returns
The access token that is returned in successful authentication responses is a JWT that can be used to verify that a user has an active session. Retrieve the application’s OpenID configuration from https://api.workos.com/user_management/<clientId>/.well-known/openid-configuration for its jwks_uri and the default ClientId issuer. With the default issuer mode, use the exact issuer from this metadata to validate the token.
OpenID discovery does not reflect configured legacy or alternate issuer modes. For those environments, validate against the configured expected issuer instead; do not disable issuer validation or derive the expected value from an unverified token. See Access Token validation, or contact support to confirm the expected issuer.
AuthKit access tokens do not include an aud claim by default. To bind validation to a specific application, compare client_id with that application’s client ID.
Access Token JWT
The refresh token can be used to obtain a new access token using the authenticate with refresh token endpoint. Refresh tokens may only be used once. Refreshes will succeed as long as the user’s session is still active.