You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it shouldn't work like auth({ type: "reset" }), because creating a scoped token does not invalidate the current token. I think what we should do is to reuse the factory pattern from @octokit/auth-app which would make it possible to create a new octokit instance from the current one, and the new instance would be authenticated using the scoped token, or we could create a new auth instance like this
In order to make the above code possible, createOAuthUserAuth() would need to accept additional options specific to scoping user-to-server access tokens, which might not be to bad of an idea anyway.
Follow up to #1
What’s missing?
The feature to Create a scoped access token is not yet implemented.
I think it shouldn't work like
auth({ type: "reset" })
, because creating a scoped token does not invalidate the current token. I think what we should do is to reuse thefactory
pattern from@octokit/auth-app
which would make it possible to create a newoctokit
instance from the current one, and the new instance would be authenticated using the scoped token, or we could create a newauth
instance like thisIn order to make the above code possible,
createOAuthUserAuth()
would need to accept additional options specific to scoping user-to-server access tokens, which might not be to bad of an idea anyway.Alternatives you tried
scopeToken()
from@octokit/oauth-methods
works to create the scoped authentication.The text was updated successfully, but these errors were encountered: