class

Comrade::Providers::WorkOS

Inherits Comrade::Providers::OAuth2Provider < Comrade::Providers::BaseProvider < Reference < Object

WorkOS SSO provider - Enterprise-ready OAuth 2.0 authentication Supports SSO via SAML, OIDC, and direct OAuth providers

Instance methods

authorization_url
Source
default_scopes

Default scopes for WorkOS (typically empty for SSO)

Source
get_token(code : String, state : String | Nil = nil, **options) : Token

Exchange authorization code for access token

Source
get_user(token : Token) : User

Get user information using access token

Source
redirect(scopes : Array(String) = [] of String, state : String | Nil = nil, connection : String | Nil = nil, organization : String | Nil = nil, provider : String | Nil = nil, domain_hint : String | Nil = nil, login_hint : String | Nil = nil, **options) : String

Generate authorization URL with WorkOS-specific parameters

Source
refresh_token(refresh_token : String, **options) : Token

WorkOS doesn't support traditional token refresh Tokens are typically valid until revoked

Source
revoke_token(token : String) : Bool

Revoke access token (WorkOS supports this)

Source
token_url
Source
user_url
Source