Skip to main content
Ruba supports the OAuth 2.0 authorization-code flow with OpenID Connect. The user approves requested scopes in Ruba, your callback receives a one-use code, and your server exchanges it for tokens.
These fields follow the OpenID Connect authorization request. The resulting token acts as the consenting user. During consent, that user may restrict it to selected organizations; otherwise it covers all organizations they can access, including ones joined later. Access always follows current membership, so leaving an organization removes access. Token introspection returns the restriction in organizations; an empty array means no explicit organization restriction. After approval, Ruba redirects to redirect_uri?code=....

2. Exchange the one-use code

A confidential client sends its ID and secret to the token endpoint:
Use access_token for API calls, retain refresh_token to obtain another access token after expiry, and validate id_token as the signed user identity described by the OpenID Connect ID Token specification.

Public clients use PKCE

An SPA, mobile app, or device application cannot keep a client secret. When the OAuth client is explicitly configured as public, omit client_secret and complete PKCE instead. Confidential clients must not use this exception.

3. Call the API

Place the access token in the Bearer authorization header: