mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 21:57:47 +02:00
Set up the Webauthn settings view
This commit is contained in:
22
resources/js_vue3/services/userService.js
vendored
22
resources/js_vue3/services/userService.js
vendored
@ -14,5 +14,27 @@ export default {
|
||||
updatePreference(name, value) {
|
||||
return apiClient.put('/user/preferences/' + name, { value: value })
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all webauthn devices
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {any} value
|
||||
* @returns promise
|
||||
*/
|
||||
getWebauthnDevices(config = {}) {
|
||||
return webClient.get('/webauthn/credentials', {...config})
|
||||
},
|
||||
|
||||
/**
|
||||
* Revoke a webauthn device
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {any} value
|
||||
* @returns promise
|
||||
*/
|
||||
revokeWebauthnDevice(credentialId, config = {}) {
|
||||
return webClient.delete('/webauthn/credentials/' + credentialId, {...config})
|
||||
},
|
||||
|
||||
}
|
Reference in New Issue
Block a user