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

Fix log creation in the LogoutListener to use correct class #114

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

jimwins
Copy link

@jimwins jimwins commented Feb 1, 2025

It is possible to use a custom AuthenticationLog by overriding the authentications() and latestAuthentication() methods from the AuthenticationLoggable trait, except for this listener which tries creates a new AuthenticationLog directly. By going through the User model, we will create an object of the correct (custom) class.

This fixes the specific problem of a custom AuthenticationLog model that uses the \Illuminate\Database\Eloquent\Concerns \hasUlids trait not being successfully created here because it fails to generate the id.

rappasoft and others added 3 commits March 28, 2024 20:37
This reverts commit 1621f54, reversing
changes made to bdedfee.
It is possible to use a custom `AuthenticationLog` by overriding the `authentications()` and `latestAuthentication()` methods from the `AuthenticationLoggable` trait, except for this listener which tries creates a new `AuthenticationLog` directly. By going through the User model, we will create an object of the correct (custom) class.

This fixes the specific problem of a custom `AuthenticationLog` model that uses the `\Illuminate\Database\Eloquent\Concerns \hasUlids` trait not being successfully created here because it fails to generate the id.
@jimwins
Copy link
Author

jimwins commented Feb 1, 2025

Related to #108.

@lrljoe lrljoe changed the base branch from main to develop March 1, 2025 00:34
@lrljoe
Copy link
Collaborator

lrljoe commented Mar 1, 2025

Rebased to develop for merging this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants