octocrab icon indicating copy to clipboard operation
octocrab copied to clipboard

Authentication breaks for "child" clients

Open marcusirgens opened this issue 1 year ago • 1 comments

Looks like authentication still breaks for "child" clients, such as when making an installation client, even after #602.

I believe the code in question, also from #562 (https://github.com/XAMPPRocky/octocrab/commit/3ce474aab56e87e4dfde50ec0f0e1d79334a5e4b), is here: https://github.com/XAMPPRocky/octocrab/blob/344cfa798b0d450d12ba85de589ce190047ddadb/src/lib.rs#L1540-L1551

From what I can tell, it doesn't look like the authentication layer (from the middleware module) is modified when the client is cloned: https://github.com/XAMPPRocky/octocrab/blob/344cfa798b0d450d12ba85de589ce190047ddadb/src/lib.rs#L977-L991

How would you like to see this solved, @XAMPPRocky? Is there a specific reason for why the auth logic is duplicated, or is it because it's hard to change the client, once constructed?

marcusirgens avatar Mar 19 '24 19:03 marcusirgens

Thank you for your issue! I don't think there's a specific reason.

XAMPPRocky avatar Mar 20 '24 06:03 XAMPPRocky