Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

synergy's avatar

OAuth middleware

I managed to successfully complete the OAuth flow and gain access token for the user. The OAuth is on a separate server & identity provider (OpenID Connect).

Now, I need to add middleware to check that the user is authenticated throughout his session in the application.

Any idea/directions on how I can manage this? Quite lost.

0 likes
4 replies
tisuchi's avatar

@synergy Isn't api middleware appropriate for that? Have you tried with that?

synergy's avatar

@tisuchi I forgot to mention that the OAuth is a separate server (OpenID Connect). Not using Laravel Passport.

Please or to participate in this conversation.