33namespace Auth0 \Login ;
44
55use Auth0 \SDK \API \Helpers \State \SessionStateHandler ;
6+ use Auth0 \SDK \API \Helpers \State \StateHandler ;
67use Auth0 \SDK \Auth0 ;
78use Auth0 \SDK \Helpers \Cache \CacheHandler ;
89use Auth0 \SDK \JWTVerifier ;
@@ -31,13 +32,14 @@ class Auth0Service
3132 *
3233 * @param array $auth0Config
3334 * @param StoreInterface $sessionStorage
35+ * @param StateHandler|null $stateHandler
3436 *
3537 * @throws \Auth0\SDK\Exception\CoreException
3638 */
3739 public function __construct (
3840 array $ auth0Config = null ,
3941 StoreInterface $ sessionStorage = null ,
40- SessionStateHandler $ sessionStateHandler = null
42+ StateHandler $ stateHandler = null
4143 )
4244 {
4345 // Backwards compatible fallbacks
@@ -47,12 +49,12 @@ public function __construct(
4749 if (!$ sessionStorage instanceof StoreInterface) {
4850 $ sessionStorage = new LaravelSessionStore ();
4951 }
50- if (!$ sessionStateHandler instanceof SessionStateHandler ) {
51- $ sessionStateHandler = new SessionStateHandler ($ sessionStorage );
52+ if (!$ stateHandler instanceof StateHandler ) {
53+ $ stateHandler = new SessionStateHandler ($ sessionStorage );
5254 }
5355
5456 $ auth0Config ['store ' ] = $ sessionStorage ;
55- $ auth0Config ['state_handler ' ] = $ sessionStateHandler ;
57+ $ auth0Config ['state_handler ' ] = $ stateHandler ;
5658 $ this ->auth0 = new Auth0 ($ auth0Config );
5759 }
5860
0 commit comments