This is a simple project demonstrating JWT (JSON Web Token) and SSO authentication in Go using Gin for the backend and Gorm as the ORM (Object Relational Mapper) with MySQL database. The project includes basic frontend HTML/CSS for login, signup, and forgot password functionality.
- User authentication with JWT
- Signup, login, forgot password, and reset password functionality
- MySQL database integration with Gorm
- Basic HTML/CSS frontend for user interaction
- Go installed on your machine
- MySQL installed and running
- Basic understanding of Go, Gin, Gorm, JWT, HTML, and CSS
-
Clone the repository:
git clone https://github.com/imrkaofficial/jwtssoauthapp.git cd jwtssoauthapp
-
Install Dependencies:
go mod download
-
Set up MySQL database:
- Update the MySQL DSN in
main.go
with your database connection details.
- Update the MySQL DSN in
-
Run the application:
go run main.go
The server will start and listen on port 9000.
- To visit on pages
- Login page:
http://localhost:9000/login
- Signup page:
http://localhost:9000/signup
- Forgot Password page:
http://localhost:9000/forgotpwd
- Login page:
- Rajat Kumar Goyal
This project is licensed under the MIT LICENSE.