芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/lavishbdlifestyle.com/app/Services/Revoke/AppleRevoke.php
user()->refresh_token; $client_id = env('SIGN_IN_WITH_APPLE_CLIENT_ID'); $client_secret = env('SIGN_IN_WITH_APPLE_CLIENT_SECRET'); $redirect_uri = env('SIGN_IN_WITH_APPLE_REDIRECT'); $server_output = Http::asForm()->post('https://appleid.apple.com/auth/token', [ 'client_id' => $client_id, 'client_secret' => $client_secret, 'grant_type' => $grant_type, 'refresh_token' => $refresh_token, 'redirect_uri' => $redirect_uri, ]); $access_token = $server_output->object()->access_token; $revoke_output = Http::asForm()->post('https://appleid.apple.com/auth/revoke', [ 'client_id' => $client_id, 'client_secret' => $client_secret, 'token_type_hint' => $grant_type, 'token' => $access_token, ]); return $revoke_output->ok(); } }