Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

AnonymousAuthenticationProvider causes HTTP layer to throw error

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
ruby

Research direction

Start with anonymous_authentication_provider.rb and the call at faraday_request_adapter.rb:52, then reproduce the issue with the PostsClient snippet in the report. Check the return from authenticate_request and verify that the anonymous provider no longer causes the HTTP layer to call resume on nil and that the request completes successfully.

Written by the indexing model from the issue text.

Description

auth_provider = MicrosoftKiotaAbstractions::AnonymousAuthenticationProvider.new()
request_adapter = MicrosoftKiotaFaraday::FaradayRequestAdapter.new(auth_provider)
client = Client::PostsClient.new(request_adapter)

all_posts = client.posts_by_id("5").get.resume

This results in the following error:

/home/jasonjoh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/microsoft_kiota_faraday-0.11.0/lib/microsoft_kiota_faraday/faraday_request_adapter.rb:52:in `block in send_async': undefined method `resume' for nil:NilClass (NoMethodError)

        @authentication_provider.authenticate_request(request_info).resume

As a test, I modified anonymous_authentication_provider.rb, changing the authenticate_request to:

def authenticate_request(request)
  Fiber.new do
  end
end

And that resolved the error.

Dominant language
Ruby
Stars
5
Forks
8
Avg merge
19h 44m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/kiota-ruby

All issues in microsoft/kiota-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.