Skip to content

Commit

Permalink
fix(backend): addded created date on the project response, set expiry…
Browse files Browse the repository at this point in the history
… of access token to 1 hour (#1633)
  • Loading branch information
Sujanadh authored Jul 5, 2024
1 parent b14e199 commit c0ece70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/app/auth/osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def create_tokens(jwt_data: dict) -> tuple[str, str]:

def refresh_access_token(payload: dict) -> str:
"""Generate a new access token."""
payload["exp"] = int(time.time()) + 60 # Access token valid for 15 minutes
payload["exp"] = int(time.time()) + 3600 # Access token valid for 1 hour

return jwt.encode(
payload,
Expand Down
1 change: 1 addition & 0 deletions src/backend/app/projects/project_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ class ProjectBase(BaseModel):
author: User
project_info: ProjectInfo
status: ProjectStatus
created: datetime
# location_str: str
xform_category: Optional[XLSFormType] = None
hashtags: Optional[List[str]] = None
Expand Down

0 comments on commit c0ece70

Please sign in to comment.