fix(auth): app_id can be an str#146
Conversation
bhearsum
left a comment
There was a problem hiding this comment.
I think the reason this is typed as an int, is because all valid github app ids are ints AFAIK, even though it goes over the wire as a string in the end, so only accepting ints is a form of validation that callers are doing the right thing.
With that said, I imagine that this is often is read by callers from places that are strings...and it can be annoying to cast just to have the value cast back to a string internally.
@ahal - maybe you can tiebreak this?
|
Correction: my App ID is indeed an int, but my Client ID isn't. The GitHub endpoint for token generation accepts both, but recommends the use of the (str) Client ID https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app#:~:text=Use%20of%20the%20client%20ID%20is%20recommended%2E |
|
Maybe we should rename that parameter to EDIT: I updated the docstring for |
GitHub accepts (and recommends) Client ID strings when generating tokens [0].
[0] https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app#:~:text=Use%20of%20the%20client%20ID%20is%20recommended%2E
fixes: #145