Skip to content

Commit

Permalink
refact: configure 2-factor authentication when creating account (#154)
Browse files Browse the repository at this point in the history
* refact: configure 2-factor authentication when creating account (#147)

* refact: remove send email, 2fa create account and creating services

* refact: big refact

* fix: test

* fix: import duplicate

* refact: remove nginx

* fix: remove unused packages

* feat: add message in i18n files

* fix: auth test

* fix: function name

* feat: validating 2-factor authentication when logging in

* refact: validate secrets by level

* fix: remove log

* refact: replace folder name

* fix: remove code
  • Loading branch information
isaqueveras committed Oct 16, 2023
1 parent 3af4b44 commit 1a13a43
Show file tree
Hide file tree
Showing 55 changed files with 947 additions and 1,527 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,5 @@ migrate-down:
lint:
golangci-lint run ./...

swag:
swag init -g main.go --output docs

check:
staticcheck ./...
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,12 @@ $ make dev
# Run the migrations
$ make migrate-up

# Generate documentation
$ make swag

# Run the application in development mode
$ go run main.go
```

```bash
- The backend will open on the port:5000 # access http://localhost:5000
- The mailcatcher will open on the port:1080 # access http://localhost:1080
- The documentation will open on the port:5000: # access http://localhost:5000/swagger/index.html
```
## 😯 How to contribute to the project

Expand Down
32 changes: 7 additions & 25 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"meta": {
"project_name": "PowerSSO",
"project_url": "http://localhost:3000"
},
"project_name": "PowerSSO",
"server": {
"version": "1.0.0",
"port": ":5000",
"pprof_port": ":5555",
"mode": "dev",
"jwt_secret_key": "power-sso-secret",
"cookie_name": "jwt-power-sso",
"ssl": false,
"ctx_default_timeout": 12,
Expand All @@ -20,7 +16,7 @@
"start_grpc": false,
"access_log_directory": "/var/log/powersso/access.log",
"error_log_directory": "/var/log/powersso/error.log",
"permission_base": "github.com/isaqueveras/power-sso",
"permission_base": "github.com/isaqueveras/powersso",
"access_control_allow_origin": "*",
"open_sessions_per_user": 5
},
Expand All @@ -31,30 +27,16 @@
"password": "postgres",
"dbname": "power-sso",
"sslmode": false,
"driver": "pgx",
"max_open_conns": 60,
"max_idle_conns": 30,
"conn_max_life_time": 120,
"conn_max_idle_time": 20,
"timeout": 2
},
"logger": {
"development": true,
"disable_caller": false,
"disable_stacktrace": false,
"encoding": "json",
"level": "info"
},
"mailer": {
"host": "localhost",
"port": 1025,
"email": "[email protected]",
"username": "PowerSSO",
"password": "password",
"tls": false
},
"user_auth_token": {
"secret_key": "kjnfdjksdbfsdhfbdskjfnamkndkn",
"duration": 2592000
"secrets_duration": 2592000,
"secrets_tokens": {
"user": "kjnfdjksdbfsdhfbdskjfnamkndkn",
"admin": "oCb9A8T7zHyx8MXBFb1aEouAXnBg2",
"integration": "krIhDsgYFY3ByJLony15bDSzBAsl5"
}
}
206 changes: 0 additions & 206 deletions application/auth/auth_business.go

This file was deleted.

Loading

0 comments on commit 1a13a43

Please sign in to comment.