Next.js Discord

Discord Forum

API

Answered
Pyramid ant posted this in #help-forum
Open in Discord
Avatar
Pyramid antOP
Im usining Auth.js and how can i secure the API of th Auth.js ?

Or whole APIs ?
Answered by B33fb0n3
you can use the middleware for that. Check the auth in your middleware and if he is authorized, let the request run through, else redirect the user to /sign-in or any other route
View full answer

8 Replies

Avatar
@Pyramid ant Im usining Auth.js and how can i secure the API of th Auth.js ? Or whole APIs ?
Avatar
you can use the middleware for that. Check the auth in your middleware and if he is authorized, let the request run through, else redirect the user to /sign-in or any other route
Answer
Avatar
Avatar
i am also encrypting the password between client and server btw @Pyramid ant @B33fb0n3
i suggest you do that too
Avatar
@Diamond Master i am also encrypting the password between client and server btw <@1338273633390559324> <@301376057326567425>
Avatar
Pyramid antOP
Im usining magic links ( API is for login and register )
Avatar
@Diamond Master i am also encrypting the password between client and server btw <@1338273633390559324> <@301376057326567425>
Avatar
Yea, I guess it’s basic knowledge that you should look at security, when building an auth system. Even if it’s a library
they just send it plaintext and rely on https