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

Allow delete and generate api keys #265

Closed
riderx opened this issue Aug 13, 2023 · 16 comments
Closed

Allow delete and generate api keys #265

riderx opened this issue Aug 13, 2023 · 16 comments

Comments

@riderx
Copy link
Contributor

riderx commented Aug 13, 2023

Currently, the APIKEY are created when account is created but there are no way to roll the key if they leaked.
CleanShot 2023-08-13 at 14 45 40@2x

a nice addition would be to be able to add key by type, delete and update key

@riderx
Copy link
Contributor Author

riderx commented Aug 13, 2023

/bounty 100

@algora-pbc
Copy link

algora-pbc bot commented Aug 13, 2023

💎 $100 bounty created by riderx
🙋 If you start working on this, comment /attempt #265 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #265 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to Cap-go/capgo!

Attempt Started (GMT+0) Solution
🔴 @sravanth299 Aug 13, 2023, 1:14:06 PM WIP
🟢 @WcaleNieWolny Aug 14, 2023, 2:12:25 PM #266

@sravanth-space
Copy link

sravanth-space commented Aug 13, 2023

/attempt #265

Options

1 similar comment
@WcaleNieWolny
Copy link
Contributor

WcaleNieWolny commented Aug 14, 2023

/attempt #265

Options

@algora-pbc
Copy link

algora-pbc bot commented Aug 14, 2023

Note: The user @sravanth299 is already attempting to complete issue #265 and claim the bounty. If you attempt to complete the same issue, there is a chance that @sravanth299 will complete the issue first, and be awarded the bounty. We recommend discussing with @sravanth299 and potentially collaborating on the same solution versus creating an alternate solution.

@algora-pbc
Copy link

algora-pbc bot commented Aug 14, 2023

💡 @WcaleNieWolny submitted a pull request that claims the bounty. You can visit your org dashboard to reward.

@riderx
Copy link
Contributor Author

riderx commented Aug 14, 2023

Capgo have backend function only when nothing else can be done.
With a good RLS this can be done in frontend fully.

Renew a key should be after confirm alert, to prevent miss click.

@WcaleNieWolny
Copy link
Contributor

Thanks a lot for you input, I am not going to close this and I am going to work on this tomorrow hopefully fixing all of the mentioned issues

@WcaleNieWolny
Copy link
Contributor

Also what do you mean by "add by type" so like add a read only key? And updating the key should allow the user to type the key or just regenerate it?

@riderx
Copy link
Contributor Author

riderx commented Aug 15, 2023

there are 3 type of keys:

  • upload
  • read
  • write (all)

So when create a new one the user should show what type he wants to create.
I don't think change the type is necessary, only rolling the key.

@sravanth-space
Copy link

@riderx This is the first time I am contributing to this repo. I am trying to set up using 263.

supabase start
Seeding data supabase\seed.sql...
ERROR: relation "public.apps" does not exist (SQLSTATE 42P01)
Try rerunning the command with --debug to troubleshoot the error.

I am failing at the supabase setup.

@WcaleNieWolny
Copy link
Contributor

I want to ask: How important it is to require secure contexts (HTTPS or localhost) for the API keys? I want to use the browser crypto API. I initialy used an edge function to avoid having to deal with crypto in the browser

@WcaleNieWolny
Copy link
Contributor

WcaleNieWolny commented Aug 15, 2023

I have implemented the regenerating on the frontend + I have added a dialog option. Please revew my changes

Edit: I have provided a video of my changes in the PR

@WcaleNieWolny
Copy link
Contributor

there are 3 type of keys:

* upload

* read

* write (all)

So when create a new one the user should show what type he wants to create. I don't think change the type is necessary, only rolling the key.

There are 4 types of keys. Should I add all of them in or only the ones mentioned by you?
image

@WcaleNieWolny
Copy link
Contributor

@riderx This is the first time I am contributing to this repo. I am trying to set up using 263.

supabase start

Seeding data supabase\seed.sql...

ERROR: relation "public.apps" does not exist (SQLSTATE 42P01)

Try rerunning the command with --debug to troubleshoot the error.

I am failing at the supabase setup.

You need to manually connect to Postgress and manually execute the code from schema.sql then from seed.sql

@algora-pbc
Copy link

algora-pbc bot commented Aug 15, 2023

🎉🎈 @WcaleNieWolny has been awarded $100! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants