Class: Supabase::Auth::Async::Client

Inherits:
Client
  • Object
show all
Defined in:
lib/supabase/auth/async/client.rb

Overview

Async counterpart to Client.

Inherits the full public surface (sign_up, sign_in_with_password, get_user, set_session, refresh_session, MFA, identities, JWT claims, subscriptions, etc.) and rewires only the HTTP layer to use async-http-faraday:

Call sites must run inside an ‘Async do … end` block (see docs/async_design.md §4 for usage examples and §6 for fiber/state semantics).

Constant Summary

Constants inherited from Client

Client::ALG_TO_DIGEST, Client::DEFAULT_OPTIONS, Client::EXPIRY_MARGIN, Client::JWKS_TTL, Client::STORAGE_KEY

Instance Attribute Summary

Attributes inherited from Client

#admin, #headers, #mfa, #url

Instance Method Summary collapse

Methods inherited from Client

#_auto_refresh_token=, #_call_refresh_token, #_flow_type, #_flow_type=, #_get_url_for_provider, #_is_implicit_grant_flow, #_jwks, #_list_factors, #_notify_all_subscribers, #_recover_and_refresh, #_refresh_access_token, #_remove_session, #_request, #_save_session, #_start_auto_refresh_token, #_storage, #_storage_key, #_url, #exchange_code_for_session, #get_claims, #get_session, #get_user, #get_user_identities, #init, #initialize_from_storage, #initialize_from_url, #link_identity, #on_auth_state_change, #reauthenticate, #refresh_session, #resend, #reset_password_email, #reset_password_for_email, #set_session, #sign_in_anonymously, #sign_in_with_id_token, #sign_in_with_oauth, #sign_in_with_otp, #sign_in_with_password, #sign_in_with_sso, #sign_out, #sign_up, #unlink_identity, #update_user, #verify_otp

Constructor Details

#initialize(url:, headers: {}, **options) ⇒ Client

Returns a new instance of Client.



23
24
25
26
27
28
29
# File 'lib/supabase/auth/async/client.rb', line 23

def initialize(url:, headers: {}, **options)
  super
  @api = Api.new(url: @url, headers: @headers, http_client: @http_client,
                 verify: @verify, proxy: @proxy, timeout: @timeout)
  @admin = AdminApi.new(url: @url, headers: @headers, http_client: @http_client,
                        verify: @verify, proxy: @proxy, timeout: @timeout)
end