class Login extends Controller { public function login(Request $request){ $code = $request->param(‘code‘); $rawData = $request->param(‘rawData‘); $signature = $request->param(‘signature‘); $iv = $request->param(‘iv‘); $encryptedData = $request->param(‘encryptedData‘);
$config = [ ‘app_id‘ => "", ‘secret‘ => ‘‘ ]; $app = Factory::miniProgram($config); $a = $app->auth->session($code); } }