Skip to main content

Changes in this section

Insomnia files

Remember to get the Insomnia files for this section or for all sections here!

In this section we will add the following endpoints:

MethodEndpointDescription
POST/registerCreate user accounts given an email and password.
POST/loginGet a JWT given an email and password.
🔒
POST
/logoutRevoke a JWT.
🔒
POST
/refreshGet a fresh JWT given a refresh JWT.
GET/user/{user_id}(dev-only) Get info about a user given their ID.
DELETE/user/{user_id}(dev-only) Delete a user given their ID.

We will also protect some existing endpoints by requiring a JWT from clients. You can see which endpoints will be protected in The API we'll build in this course