Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Necessary host Config In Docs #6

Open
TamerShlash opened this issue Jul 18, 2024 · 0 comments
Open

Missing Necessary host Config In Docs #6

TamerShlash opened this issue Jul 18, 2024 · 0 comments

Comments

@TamerShlash
Copy link

Not sure if this is the right repo for this issue, but the host option is necessary for the client to work. All the examples in the docs in the sdk repo do not mention anything about it.

Failing example:

OryClient.configure do |config|
  config.access_token = "api_key"
end

api_instance = OryClient::IdentityApi.new
id = "user-id"
opts = {
  include_credential: ["password"],
}

result = api_instance.get_identity(id, opts)

# The output:
# OryClient::ApiError: Couldn't resolve host name
# HTTP status code: 0

Working example:

OryClient.configure do |config|
  config.access_token = "api_key"
  config.host = "https://project-slug.projects.oryapis.com"
end

api_instance = OryClient::IdentityApi.new
id = "user-id"
opts = {
  include_credential: ["password"],
}

result = api_instance.get_identity(id, opts)

# The output: an actual user object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant