Closed
Description
GitHub now recommends using the clientId instead of the appId/privateKey
Augment the options to allow clientId/clientSecret, validating that either this pair or appId/privateKey are provided, and pass these options along in the call to createAppAuth
.
Activity
gr2m commentedon May 13, 2024
Just to clarify, you cannot use the Client Secret, the private key is still required. But the OAuth Client ID is now recommended to be used as a substitute to the numeric app ID for github.com, and probably GitHub Enterprise Server 3.14+
We just shipped support for passing the client ID to Octokit's app authentication strategy:
https://github.com/octokit/auth-app.js/releases/tag/v7.1.0
[-]Support now-recommended clientId/clientSecret[/-][+]Support Client ID as an alternative input to Client Secret[/+]joebowbeer commentedon Aug 7, 2024
@cloudshiftchris edit title to clarify that support is sought for using clientId instead of appId?
@gr2m are you saying this is already supported via octokit/auth-app.js#606 ?
gr2m commentedon Aug 8, 2024
yes
BeyondEvil commentedon Jan 9, 2025
So does this mean that we can pass in client ID instead of app ID, and this issue can be closed... or? @gr2m
joebowbeer commentedon Jan 9, 2025
I think this should be closed. I have used clientId in place of appId
gr2m commentedon Jan 13, 2025
we should document the fact that client ID can be used as an alternative to the app ID, then we can close this issue
jeffwidman commentedon May 19, 2025
A somewhat self-documenting way to do this would be to add a new
client-id
parameter:Then
app-id
could be deprecated and removed in a future version.docs(README): Client ID can be used as App ID
gr2m commentedon May 20, 2025
The problem with that approach is that
app-id
would no longer be required, which helps with Intellisense and with catching bugs today. I agree though that eventually we should supportclient-id
instead ofapp-id
, to align with GitHub's recommendation.For now, I suggest we merge #251
For the migration from
app-id
toclient-id
, I suggest the followingv3
with other breaking changes, Updatev2
addclient-id
as input, removerequired
fromapp-id
, and mark it as deprecatedv3
, add a custom error if theapp-id
is set to help with the upgrade.But we just released a breaking version, I'd give us some time to see what other things we need to change over the next few months.
jeffwidman commentedon May 21, 2025
Makes sense--do you want to create a tracking issue for "v3 breaking changes list" so that you don't lose track of this one?
docs(README): Client ID can be used as App ID (#251)