Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization of 'Closure' is not allowed #326

Closed
bettinz opened this issue Jul 28, 2021 · 2 comments
Closed

Serialization of 'Closure' is not allowed #326

bettinz opened this issue Jul 28, 2021 · 2 comments

Comments

@bettinz
Copy link

bettinz commented Jul 28, 2021

Hello, using the apple login with this bundle I have this server error:

Serialization of 'Closure' is not allowed
The error is triggered from

/vendor/symfony/security-guard/Authenticator/GuardBridgeAuthenticator.php in serialize at line 78

        throw new \UnexpectedValueException(sprintf('The return value of "%1$s::getCredentials()" must not be null. Return false from "%1$s::supports()" instead.', get_debug_type($this->guard)));
        }
        // get the user from the GuardAuthenticator
        if (class_exists(UserBadge::class)) {
            $user = new UserBadge('guard_authenticator_'.md5(serialize($credentials)), function () use ($credentials) { return $this->getUser($credentials); });
        } else {
            // BC with symfony/security-http:5.1
            $user = $this->getUser($credentials);
        }

The line is:

$user = new UserBadge('guard_authenticator_'.md5(serialize($credentials)), function () use ($credentials) { return $this->getUser($credentials); });

Can you help me to understand what is wrong? I'm using sf 5.3 with new authenticator system

enable_authenticator_manager: true

Thanks

@DonCallisto
Copy link
Contributor

Does this patrickbussmann/oauth2-apple#29 resolve your issue? @bettinz

@bettinz
Copy link
Author

bettinz commented Oct 6, 2021

Hi @DonCallisto , I can't try the fix because I'm not working with this bundle right now. I'm closing the issue.

@bettinz bettinz closed this as completed Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants