Skip to content

Fire Passport Events #77

@mikemclin

Description

@mikemclin

What about firing Passport events throughout the process? There are several reasons why someone might be interested in these details. One might be for logging when someone gets a token (see: thephpleague/oauth2-server#628).

For example: in Laravel\Passport\Bridge\RefreshTokenRepository::persistNewRefreshToken(), I added event('passport.refresh', $refreshTokenEntity->getAccessToken()->getUserIdentifier()); to the bottom of the method, because I needed to know when a refresh token is created, and for whom.

It would be nice if Passport had these types of events natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions