开放平台报授权报Credential "component_verify_ticket" does not exist in cache

CodeAnti
class AuthController
{
    public function auth()
    {
        $config = config('wechat.open_platform.mini_program');
        $openPlatform = Factory::openPlatform($config);
        $code = $openPlatform->createPreAuthorizationCode();
    }
}

不用创建预授权码 直接获取授权链接,它会自动获取预授权码

$openPlatform = Factory::openPlatform($config);
return $openPlatform->getPreAuthorizationUrl($callback_url);

component_verify_ticket文档有说明 三方平台授权回调url指向下面的方法,等十分钟再调用上面的方法,就不会报component_verify_ticket找不到的错误了

public function index()
{
    return $openPlatform->server->serve();
}

兄弟 你的可以了吗 微信第三授权