r0man / oauth-clj

Clojure OAuth library
95 stars 27 forks source link

oauth-authorization-url failing to destructure optional key parameter #34

Open evanpeterjones opened 2 years ago

evanpeterjones commented 2 years ago

Function returns properly without the options parameter, but clojure syntax is not destructuring the parameter properly. The error is below, you can simulate the same error with the following code.

(def opt {:response-type "code" :test "asdf"})

(defn test-fn [_ & {:as options}] nil)

(test-fn nil opt)

I also get the following error: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Cannot open <nil> as a Reader.

Text of the error for search engines: No value supplied for key: {:response-type "code"}

Screen Shot 2022-01-24 at 10 13 30 PM
evanpeterjones commented 2 years ago

oh, I went through the whole process of submitting this and a pull request only to come out of the brain fog and realize this wasn't expecting me to pass in a map. Ignore all of this. Sorry, it's been a day.