Skip to content

req_oauth_bearer_jwt requires claim twice #825

@drmowinckels

Description

@drmowinckels

I've found that to use req_oauth_bearer_jwt the jwt_claim needs to be passed in two instances for httr2 to not error.
It needs to be

  • in the function it self (else function errors with "claim missing with no default")
  • in the client auth_params (else errors with "client needs jwt_claim in auth_params when using jwt_sig")

Is it really necessary to pass the claim twice, or should not the claim be passed from the client to the function (like the "key" parameter is)?

claim <- jwt_claim()

httr2::req_oauth_bearer_jwt(
  claim = claim,
  client = meetupr_client(
    key = "/path/to/key.pem",
    auth = "jwt_sig",
    auth_params = list(
      claim = claim
    )
  )
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions