mirror of
https://github.com/jonathan-martz/pocketbase-php-sdk.git
synced 2026-04-03 07:27:42 +00:00
fix superusers auth
This commit is contained in:
@@ -32,7 +32,8 @@ class Settings
|
||||
$bodyParams['identity'] = $email;
|
||||
$bodyParams['password'] = $password;
|
||||
$output = $this->doRequest($this->url . "/api/collections/_superusers/auth-with-password", 'POST', $bodyParams);
|
||||
self::$token = json_decode($output, true)['token'];
|
||||
$data = json_decode($output, true);
|
||||
self::$token = $data['token'] ?? '';
|
||||
}
|
||||
|
||||
public function doRequest(string $url, string $method, $bodyParams = []): string
|
||||
|
||||
Reference in New Issue
Block a user