Module: WorkOS::PublicClient
- Defined in:
- lib/workos/public_client.rb
Class Method Summary collapse
-
.create(client_id:, **opts) ⇒ WorkOS::Client
Construct a WorkOS::Client suitable for PKCE-only / public-client use.
Class Method Details
.create(client_id:, **opts) ⇒ WorkOS::Client
Construct a WorkOS::Client suitable for PKCE-only / public-client use. No api_key is required — methods that would normally send a Bearer Authorization header will skip it. Use PKCE flows on user_management and sso (‘get_authorization_url_with_pkce`, `authenticate_with_code_pkce`, etc.) instead of methods that require server-side credentials.
22 23 24 25 |
# File 'lib/workos/public_client.rb', line 22 def create(client_id:, **opts) raise ArgumentError, "client_id is required" if client_id.nil? || client_id.empty? WorkOS::Client.new(client_id: client_id, **opts) end |