The ory-client Ruby gem isn't documented well enough and it took me a while until I could finally get it working. It would be great to provide some working examples in the documentation. In my case, I want to use the FrontEnd api in order to get the user identity from the cookie. It would be great if that use case was documented somewhere. This is what I did in my application, as an example:
require 'ory-client'
OryClient.configure do |config|
config.scheme = 'http'
config.host = 'localhost:4001'
config.server_index = nil # important! had to dig in its source to figure out this was required
end
# in the controller:
api_instance = OryClient::FrontendApi.new
session =
api_instance.to_session(cookie: request.headers['cookie'])