Hello everyone,
I have a Laravel application with a Vue.js (Vite) frontend. Here’s how authentication is currently handled:
- My frontend uses Laravel’s
apiguard with php-open-source-saver/jwt-auth to manage authentication via JWT. - A third-party application relies on my Laravel backend for authentication via SAML.
The issue:
- A user logs into my frontend using JWT (via the
apiguard). - They then access the third-party application.
- The third-party app redirects them to my Laravel backend for SAML authentication.
- They are asked to enter their credentials again, even though they are already logged in via JWT.
I’m looking for a way to ensure that when a user is already authenticated via JWT, they are automatically authenticated via SAML without having to re-enter their credentials.
My questions:
- How can I avoid requiring the user to enter their credentials again and leverage the existing JWT session to generate an automatic SAML session?
- Would it be possible to automatically initiate the SAML authentication process using the JWT on the server?
- Are there any existing solutions or packages to facilitate this synchronization?
- If php-open-source-saver/jwt-auth isn’t suitable, what alternative package would you recommend?
I’m open to adjusting my authentication system if necessary.
Thanks in advance for your help! 😊