Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Limit GitHub authorization scope to selected repositories instead of all public repos #22

Open
b1tg opened this issue Oct 7, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@b1tg
Copy link

b1tg commented Oct 7, 2024

First of all, Tinymind is a fantastic tool.

I've noticed an area where I believe we could enhance user privacy and security: When logging in with GitHub, users need to authorize Tinymind to access all of their public GitHub repositories, which seems unnecessary. Could we limit the access to selected repositories instead?

@mazzzystar
Copy link
Owner

Hi I've tried to give permission to only "create repo" and "modify that repo", but I found I can't do that because when auth user didn't have that repo.

Any good ideas for this part?

tinymind/lib/auth.ts

Lines 27 to 38 in d1a8745

export const authOptions: NextAuthOptions = {
providers: [
GithubProvider({
clientId: process.env.GITHUB_ID!,
clientSecret: process.env.GITHUB_SECRET!,
authorization: {
params: {
scope: 'public_repo workflow'
}
}
}),
],

@b1tg
Copy link
Author

b1tg commented Oct 7, 2024

Sorry, I don't have the experience debugging GitHub authentication processes, but when i use hashnode.com 's Back up to Github (accessible via Dashboard -> GitHub -> GitHub integration), it only asks for single repo access, which might be helpful.

@mazzzystar
Copy link
Owner

Thank you, I will try out later.

@mazzzystar mazzzystar added the help wanted Extra attention is needed label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants