- Refactory cookie and API session handle. Insolated y routes and controllers (api-auth.go, app-auth.go).
- Cookie lifetime with sliding expiration - Fix bug single global expiresAt in JWT, now each token has unique ExpiresAt
This commit is contained in:
parent
bf8e2e90ec
commit
10ded026df
10 changed files with 358 additions and 304 deletions
3
.env-dev
3
.env-dev
|
|
@ -24,12 +24,13 @@ TEMPLATE_ENABLE=true
|
|||
APP_ENABLE=true
|
||||
CDNEnable=false
|
||||
COOKIE_SECRET=13d6b4dff8f84a10851021ec8608f814570d562c92fe6b5ec4c9f595bcb3234b
|
||||
COOKIE_SECURE=false
|
||||
|
||||
#######################################
|
||||
###### JWT ######
|
||||
#######################################
|
||||
JWT_SECRET=dkfTgonmgaAdlgkw
|
||||
JWT_LIFESPAN_MINUTES=1440 # expires after 1 day
|
||||
JWT_LIFESPAN_MINUTES=5 # expires after 1 day
|
||||
|
||||
#######################################
|
||||
###### DATABASE ######
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue