Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 2 additions & 0 deletions apps/settings/lib/Controller/AuthSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ private function checkAppToken(): bool {
* @return array|JSONResponse
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired(strict: true)]
public function destroy($id) {
if ($this->checkAppToken()) {
return new JSONResponse([], Http::STATUS_BAD_REQUEST);
Expand Down Expand Up @@ -183,6 +184,7 @@ public function destroy($id) {
* @return array|JSONResponse
*/
#[NoAdminRequired]
#[PasswordConfirmationRequired(strict: true)]
public function update($id, array $scope, string $name) {
if ($this->checkAppToken()) {
return new JSONResponse([], Http::STATUS_BAD_REQUEST);
Expand Down
4 changes: 2 additions & 2 deletions apps/settings/src/store/authtoken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
* @param token Token to update
*/
async updateToken(token: IToken) {
const { data } = await axios.put(`${BASE_URL}/${token.id}`, token)
const { data } = await axios.put(`${BASE_URL}/${token.id}`, token, { confirmPassword: PwdConfirmationMode.Strict })
return data
},

Expand Down Expand Up @@ -105,7 +105,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
this.tokens = this.tokens.filter(({ id }) => id !== token.id)

try {
await axios.delete(`${BASE_URL}/${token.id}`)
await axios.delete(`${BASE_URL}/${token.id}`, { confirmPassword: PwdConfirmationMode.Strict })
logger.debug('App token deleted')
return true
} catch (error) {
Expand Down
Loading