identity-vault/app/controllers/static_pages_controller.rb
nora 0bd3d609bb
Flavortown onboarding (#97)
* add flavortown scenario and channels

* add special app support for SSO grid

* add flavortown app card

* downcase

* add onboarding scenario to program

* cooked

* RALSEI ENGINE IS A REAL ENGINE NOW
2025-12-09 20:13:24 -05:00

35 lines
1,004 B
Ruby

class StaticPagesController < ApplicationController
skip_before_action :authenticate_identity!, only: [ :external_api_docs, :welcome, :oauth_welcome ]
def home
@sso_apps = SAMLService::Entities.service_providers.values.select { |sp| sp[:allow_idp_initiated] }
@special_apps = SpecialAppCards::Base.for_identity(current_identity)
end
def welcome
@return_to = params[:return_to]
render layout: "logged_out"
end
def oauth_welcome
# Extract client_id and login_hint from the return_to URL
@return_to = params[:return_to]
if @return_to.present?
uri = URI.parse(@return_to)
params_hash = URI.decode_www_form(uri.query || "").to_h
client_id = params_hash["client_id"]
@program = Program.find_by(uid: client_id) if client_id
@login_hint = params_hash["login_hint"]
end
@program ||= nil
render layout: "logged_out"
end
def external_api_docs
render :external_api_docs, layout: "backend"
end
def security
end
end