Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(session-management): WRK-11 Session management #6 #30

Merged
merged 50 commits into from
Sep 18, 2024

Conversation

Krr0ptioN
Copy link
Owner

@Krr0ptioN Krr0ptioN commented Sep 14, 2024

Description

Session management module and lots of refactors to make session management easier to implement

Refactors and changes

  • Authentication module is splitted into three more module: PasswordModule, TokensModule, PasswordResetModule

  • Users library is moved to core group folder from domain folder

  • Ip Detector Library: geolocation and ip intelligence library to identify clients

  • Device Detection Library: detecting client device informatoin from user-agent

  • Pino logger

API Changes

Session Management

  • GET /users/:id/sessions - Retrieving the sessions of the user with 'id'
  • GET /@me/sessions - Retrieving the sessions of the authenticated user
  • DELETE /sessions/:id - Delete the session
  • POST /sessions/:id/revoke - Revoke a user's session

Checklist

  • My code follows the code style of this project.
  • I have added tests (stories, interaction tests, unit tests, e2e tests) to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Related Issues

Closes #6

Copy link

vercel bot commented Sep 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
goran ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 9:30pm

Copy link

gitguardian bot commented Sep 14, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10823152 Triggered Company Email Password 3a5edd0 libs/core/security/src/lib/password/application/services/password.service.spec.ts View secret
10823152 Triggered Company Email Password 64e58c6 libs/core/security/src/lib/authentication/application/services/password/password.service.spec.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@Krr0ptioN Krr0ptioN added enhancement New feature or request refactor labels Sep 15, 2024
Repository owner deleted a comment from abdullahdevrel Sep 16, 2024
Copy link

sonarcloud bot commented Sep 18, 2024

Quality Gate Passed Quality Gate passed

Issues
27 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Krr0ptioN Krr0ptioN merged commit 0a17360 into main Sep 18, 2024
14 checks passed
@Krr0ptioN Krr0ptioN deleted the refact/auth-module-split-session-management branch September 18, 2024 21:56
@Krr0ptioN Krr0ptioN linked an issue Sep 19, 2024 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sign up and Login page Session based login management
1 participant