class

MultiAuth::Provider::GenericOAuth2

Inherits MultiAuth::Provider < Reference < Object

GenericOAuth2 provider allows dynamic OAuth2 provider configuration Use with the factory method for database-driven provider configuration:

MultiAuth.config("my_provider_123") do |provider_name, redirect_uri|
  config = load_from_database(provider_name) # Your DB logic
  MultiAuth::Provider::GenericOAuth2.new(
    provider_name: config.name,
    redirect_uri: redirect_uri,
    key: config.client_id,
    secret: config.client_secret,
    site: config.site,
    authorize_url: config.authorize_url,
    token_url: config.token_url,
    authentication_scheme: config.authentication_scheme,
    user_profile_url: config.user_profile_url,
    scopes: config.scopes,
    info_mappings: config.info_mappings
  )
end

Constructors

new(redirect_uri : String, key : String, secret : String)

Prevent static configuration - GenericOAuth2 must be used with factory method

Source
new(*, provider_name : String, redirect_uri : String, key : String, secret : String, site : String, authorize_url : String, token_url : String, authentication_scheme : String, user_profile_url : String, scopes : String, info_mappings : Hash(String, String))
Source

Instance methods

authentication_scheme
Source
authorize_uri(scope = nil, state = nil)
Source
authorize_url
Source
info_mappings
Source
provider_name
Source
scopes
Source
site
Source
token_url
Source
user(params : Hash(String, String))
Source
user_profile_url
Source