Easy Auth
- 20 Devlogs
- 15 Total hours
Backend authentication made simple for frontend developers — easy signup, login, and user management through a simple API.
Backend authentication made simple for frontend developers — easy signup, login, and user management through a simple API.
updated docker files and setted up for deployement but i dont know why the hackclub nest not working. i tested my friend acc also same issue. next step is try to deploy in my old pc.
Just now added a new page named Docs which contains all detail about the site and how to use it like user manual . next to add a readme and ship it.
i already created a api endpoint to create project but unfortunaly forget to add this in the ui. so i added new btn create project and for feild created a modal that asking project name. after that user can configure cors and manage users.
the problem i faced is that while clicking the manage cors its navigate to users page it is because of without using preventDefault(). now fixed all. next is to create new page for user manual how to use it like that modal
completed project users page:
just now completed users page with full flexible like edit,delete,update password like anything can do flexibly. all things done in a single function and that will handle all things and proceed in a single model
add new page called project users it will list all the project’s users list and the project owner can handle things like add,edit,delete,update users data for that project. currently done all things except listing the user data and some stuffs. only in ui. the system js is done.today that’s all i am going to sleep
added new api endpoints:
/api/v1/projects/:projectID/users (GET)
get users list of a particular project by passing it project id
/api/v1/projects/:projectID/users (POST)
instead of user registering in the site. in this the project owner can create user credential and give to them
3./api/v1/projects/:projectID/users/:userID (PUT)
by passing mail and name it can be modified for a paritcular userid
4./api/v1/projects/:projectID/users/:userID/password
the project admin can change the user password
using this endpoints the user can manage the users data flexibly.
next to add a page for managing this endpoints
Updated Projects page:
added ui for project cards with cors origin manage modal using single edit origin url . all things using single endpoint for edit,delete,add and everything. next to add a new page for instructions to integrate in the site
added the functions logic for project management pages next to create component and map the related functions to it
add project page to list the projects of the user and currently only list viewing i will integrate the cors origin endpoints restirction in the ui and then delete edit project endpoints willl create and add it
created a proper cors policy that by adding a route that used update frontend urls for their projects only our backend allow that user added frontend request otherwise it not proceed the requests. for achive this added a new function to check it is valid projects in the middle while creating user or loggin user. the website refer url is checked so it can be safe and secure
created two endpoints that one is for project wise login and another one is inside our site user can list their projects for that endpoints where created. next is to improve the proejct wise login and register endpoint that only allowed frontedn url only access this endpoints like this need to upgrade like that
created tables project’s user . currently done register endpoint for project it is achived by passing the project id in the param and the user data will be stored in the db. next is to create api endpoint for login for projects
project creating endpoint: in backend created a /api/v1/project post endpoint to create the project while verify the middleware and store with project id , name and owner id for reference. next to create endpoints to create a login and register page for that created project by passing the project id
Added Common navbar and footer for all pages. by adding in centralized main layout. and also fixed the register error that is due to not null given to google id which make the problem.
Added Register page: created a register page with same reusable css used in the login page. but there is some issues in backend need to fix it guys bye!😘
after struggling for two hours successfully created some basic ui structure and two pages that are login and profile page just inspired by hcb ui. simple and clean and created protected routes and public routes and authcontexxt to securely authenticate the users.next to create register page and implement some basic ui like nav,foot,like this stuffs
created a profile api endpoint and proper auth middleware . using the jwt token which genearted after login is used in auth head to verify the user and fetch their profile data. i done proper jwt validating like claims, sub and jwt method checking to prevent unauthorized access to any other’s person data. next step is to add login and register page for this rest APIs
created login routes by checking the hash password and if it correct login the user and provide jwt token and user data which can be used in profile page. next to build a /profile api endpoints with auth middleware after login user can get their data thats mine idea and i build and post it. thats all for today bye guys
Just now created a table using gorm automigrate with feilds name,email,password. and created a register api endpoint with propper validation like min,max and password hasing so even me can’t view user password. use gorm for dynamic change in table if needed. i tested the register endpoint in postman it works well as expected. in the first develog i said i start next frontend-backend integration but i now changed my mindset that i first create some basic api routes like login,register,profile and then starting working on frontend. next is login endpoints guys
Basic Folder Structure and DB Connection: done basic folder strcutre i am using the techstacks react,go,mysql. and done database connection to backend. currently every base is done. next to connect backend with frontend. i dont that much big dev just trying my best