4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/controllers/ruby_native/auth/sessions_controller.rb', line 4
def show
data = OAuthMiddleware.read_token(params[:token])
unless data
Rails.logger.debug { "[RubyNative] OAuth token exchange failed: invalid or expired token" }
head :unauthorized
return
end
cookies = data[:cookies] || []
redirect_url = data[:redirect_url]
Rails.logger.info { "[RubyNative] OAuth token exchanged, #{cookies.size} cookies, redirect to #{redirect_url}" }
render json: {cookies: cookies, redirect_url: redirect_url}
end
|