@@ -16,7 +16,7 @@ |
||
| 16 | 16 | <a href="<?= $url; ?>" title="Autenticar"><button>Autenticar</button></a> |
| 17 | 17 | <?php |
| 18 | 18 | echo "<h1>GET TOKEN</h1>"; |
| 19 | -if(isset($_GET['code'])){ |
|
| 19 | +if (isset($_GET['code'])) { |
|
| 20 | 20 | $data = (new Auth)->accessToken(GOOGLE_CLIENT_ID, GOOGLE_CLIENT_REDIRECT_URL, GOOGLE_CLIENT_SECRET, $_GET['code']); |
| 21 | 21 | $token = $data->access_token; |
| 22 | 22 | $refresh = $data->refresh_token; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | $param = array_map("strip_tags", $param); |
| 32 | 32 | |
| 33 | - return "https://accounts.google.com/o/oauth2/auth?".http_build_query($param); |
|
| 33 | + return "https://accounts.google.com/o/oauth2/auth?" . http_build_query($param); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function accessToken(string $clientId, string $uriRedirect, string $clientSecret, string $code): ?object |