laravel-saml2 icon indicating copy to clipboard operation
laravel-saml2 copied to clipboard

Error calling Saml2Auth::logout()

Open dmyers opened this issue 1 year ago • 2 comments

I followed the readme and get this error in my Laravel app trying to logout. I placed Saml2Auth::logout() right after Auth::logout().

OneLogin\Saml2\Error
Settings file not found: /var/www/html/vendor/onelogin/php-saml/settings.php

Have you seen this before? I wasn't sure how to fix it.

Am I doing something wrong or should I be setting the tenant somehow? If so I'm not sure how to best do that if I need to be storing the tenant in a session myself or calling something in the package. It seems that the routes that are defined in the package have a route resolver that my logout route wouldn't have.

dmyers avatar Sep 08 '22 18:09 dmyers

Upon more research, it does seem that in order to use that we have to first resolve a tenant and bootstrap a OneLoginBuilder instance. Is there a way to do that without extending a lot using built in package support? It also seems that we do still need to track the current tenant in that case as well unless I'm missing something it would be nice if the package could abstract majority of this from the application in terms of implementation.

It also seems that in order to perform a global SLO, that the nameId, sessionIndex, nameIdFormat attributes are persisted in session or cookie and sent along with the request from research from a few other repos:

  • https://github.com/onelogin/java-saml/issues/154#issuecomment-376877541
  • https://github.com/onelogin/wordpress-saml/blob/master/onelogin-saml-sso/php/functions.php#L482-L487

dmyers avatar Sep 08 '22 19:09 dmyers