Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.x] Make Passport headless (Support Laravel Jetstream and Breeze) #1771

Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
hafezdivandari committed Aug 4, 2024
commit 0130d30d7c8c82628c55294016460276c930292e
11 changes: 4 additions & 7 deletions src/Actions/CreateClient.php
Original file line number Diff line number Diff line change
@@ -32,14 +32,11 @@ public function create(array $input): Client
'confidential' => 'boolean',
])->validateWithBag('createClient');

return $this->clients->create(
Auth::user()->getAuthIdentifier(),
return $this->clients->createAuthorizationCodeGrantClient(
$input['name'],
implode(',', $input['redirect_uris']),
null,
false,
false,
(bool) ($input['confidential'] ?? false)
$input['redirect_uris'],
(bool) ($input['confidential'] ?? false),
Auth::user()
);
}
}
6 changes: 1 addition & 5 deletions src/Actions/UpdateClient.php
Original file line number Diff line number Diff line change
@@ -30,10 +30,6 @@ public function update(Client $client, array $input): void
'redirect_uris.*' => ['required', 'string', new UriRule],
])->validateWithBag('updateClient');

$this->clients->update(
$client,
$input['name'],
implode(',', $input['redirect_uris'])
);
$this->clients->update($client, $input['name'], $input['redirect_uris']);
}
}