Skip to content

Commit

Permalink
✨ feat(frontend): Add function to grant biometric access
Browse files Browse the repository at this point in the history
Added a new function `grantBiometricAccess` to handle the process of requesting biometric access and displaying alerts based on the user's decision. This function is called when biometric access is not already granted. Updated the logic for handling biometric initialization and access verification.

Refactored code in `App.vue` to improve biometric authentication flow.

See details in the diff for more information.

Closes #32
Co-authored-by: John Doe <[email protected]>
  • Loading branch information
sudoskys committed May 12, 2024
1 parent 7aab302 commit 8940a3e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ const authBiometric = () => {
const authSuccess = () => {
// 从环境变量获取后端地址
const backendEndpoint = import.meta.env.VITE_BACKEND_URL
// 去除空格
const backendUrl = `${backendEndpoint.trim()}/endpoints/verify-captcha`
const router = routerGet()
const acc = getUserAcc()
if (!backendUrl) {
if (!backendEndpoint) {
console.error('Backend URL not found')
verifyBackendMessage.success = false
verifyBackendMessage.message = 'Backend URL not configured in this deployment'
return
}
// 去除空格
const backendUrl = `${backendEndpoint.trim()}/endpoints/verify-captcha`
const router = routerGet()
const acc = getUserAcc()
if (!router) {
console.error('User params not found')
verifyBackendMessage.success = false
Expand Down

0 comments on commit 8940a3e

Please sign in to comment.