Skip to content

Conversation

@sebtiz13
Copy link
Contributor

@sebtiz13 sebtiz13 commented Sep 17, 2024

What does this PR do ?

Add before and after events for login and logout events to replace loginAttempt and logoutAttempt (previous events are keep for legacy).

So add the follow events:

  • beforeLogin triggered before login attempt
  • afterLogin triggered after login attempt and work exactly same as loginAttempt (same callback arguments)
  • beforeLogout triggered before logout attempt
  • afterLogout triggered after logout attempt and work exactly same as logoutAttempt (same callback arguments)

Other changes

  • Refactor logout method to handle error and trigger afterLogout and logoutAttempt in error case

Boyscout

  • Add logout events documentation

@codecov
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.01%. Comparing base (cb22867) to head (497d5c7).
Report is 16 commits behind head on 7-dev.

Additional details and impacted files
@@            Coverage Diff             @@
##            7-dev     #746      +/-   ##
==========================================
+ Coverage   82.86%   86.01%   +3.14%     
==========================================
  Files          46       46              
  Lines        2119     2131      +12     
  Branches      410      410              
==========================================
+ Hits         1756     1833      +77     
  Misses        282      282              
+ Partials       81       16      -65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sebtiz13 sebtiz13 merged commit fe7be9d into 7-dev Sep 18, 2024
@sebtiz13 sebtiz13 deleted the feat/auth-events branch September 18, 2024 10:38
github-actions bot pushed a commit that referenced this pull request Sep 18, 2024
# [7.12.0](v7.11.3...v7.12.0) (2024-09-18)

### Features

* **auth:** improve auth events ([#746](#746)) ([fe7be9d](fe7be9d))
@kuzzle
Copy link
Contributor

kuzzle commented Sep 18, 2024

🎉 This PR is included in version 7.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants