AlgoListed icon indicating copy to clipboard operation
AlgoListed copied to clipboard

API Auth or Encryption | Node JS Backend

Open NayakPenguin opened this issue 1 year ago • 9 comments

The rule is that only authorized users should be able to use the API, and we want to restrict calls to it from any unauthorized sources. To access the API, you'll need an authentication key stored in your environment settings. Also, try to do some encryption which will convert the values into other characters, and on the frontend side it can be extracted.

Although CORS can help with this, it has some limitations. So, if you have a clever solution, please help us solve this problem in a better way!

NayakPenguin avatar Oct 01 '23 15:10 NayakPenguin

Hello @Nayaker I'd like to contribute, please assign me.

0-mayurkaretha avatar Oct 02 '23 04:10 0-mayurkaretha

Awesome @0-mayurkaretha , because this is a somewhat complex issue, could you start by sending a simple introductory email to [email protected]?

NayakPenguin avatar Oct 02 '23 04:10 NayakPenguin

@0-mayurkaretha would you be interested in working on the issue?

NayakPenguin avatar Oct 06 '23 10:10 NayakPenguin

sure, thanks.

0-mayurkaretha avatar Oct 06 '23 10:10 0-mayurkaretha

@0-mayurkaretha Can you please check your discord

NayakPenguin avatar Oct 06 '23 11:10 NayakPenguin

Screenshot 2023-10-06 at 7 21 45 PM

NayakPenguin avatar Oct 06 '23 13:10 NayakPenguin

Screenshot 2023-10-06 at 7 21 45 PM

Here, implementing authorization means registering user and give them JWT token to be able to call api, but its not much difference. After they have a token they can call api whenever they want.

So another possible solution I am checking is to make api calls server-server side instead of client-server side. I will create PR after its done.

0-mayurkaretha avatar Oct 07 '23 03:10 0-mayurkaretha

Awesome 💪🏻

NayakPenguin avatar Oct 07 '23 03:10 NayakPenguin

https://api.cuvette.tech/api/v1/student/internship-post/active?pageNumber=1&sortByDate=true&stipendRange=[5000] I want something like this to be implemented here.

Screenshot 2023-10-08 at 2 27 07 AM

NayakPenguin avatar Oct 07 '23 20:10 NayakPenguin

Is this issue still open? If yes and if no one working then I will love to work on it. cc : @NayakPenguin

surjendu104 avatar Oct 12 '24 13:10 surjendu104

Thank you for your interest, @surjendu104.

Unfortunately, we're not working on this issue at the moment. However, feel free to explore other issues and see if you can resolve any, or you can create new issues that you identify on the website.

NayakPenguin avatar Oct 12 '24 16:10 NayakPenguin