httr2 icon indicating copy to clipboard operation
httr2 copied to clipboard

Duplicated client entries on authorised apps list

Open jl5000 opened this issue 3 years ago • 1 comments

I'm writing a client for the Jive API using the oauth_auth_code flow and it my code looks something like this:

cl <- httr2::oauth_client(id = "djwniduwdniwudqi.i",
                            token_url = token_url,
                            secret = httr2::obfuscated("erfw8f473h8wu4"),
                            auth = "header",
                            name = "Jive client")
  
  req <- req |> 
    httr2::req_oauth_auth_code(cl,
                               auth_url = auth_url,
                               cache_disk = TRUE)

This code is called each time a new request is made. The problem I'm finding is that the user is asked for permission every 2-3 days rather than every 30 days, and the list of authorised apps on the website has a long list of duplicated entries for "Jive client". Is this normal or expected? I realise I'm creating a new client object for every request but I figured the overhead was minimal as it's just constructing a list.

jl5000 avatar Jun 16 '22 09:06 jl5000

That's not expected.

hadley avatar Jun 16 '22 13:06 hadley

I think this may have been fixed with #166. I'll know for sure when a token refresh comes around.

jl5000 avatar Oct 13 '22 13:10 jl5000