我在我的 Laravel 8 应用程序中实现了https://github.com/m1guelpf/laravel-fastlogin 。它在 iphone 设备中工作正常并出现错误TypeError: Cannot read property 'create' of undefined当我将它与 Andoid 设备一起使用时。
import Cookies from 'js-cookie'
import { useRegistration } from '@web-auth/webauthn-helper'
---
---
enableBiometricAuth () {
const token = Cookies.get('XSRF-TOKEN')
useRegistration({
actionUrl: route('fastlogin.create'),
optionsUrl: route('fastlogin.create.details'),
actionHeader: {
'x-xsrf-token': token
},
}, {
'x-xsrf-token': token
})().then(() => {
alert('yes')
this.$page.props.jetstream.flash.banner = 'Face/Touch ID credentials have been added.'
},err=>{
alert(err); // getting cannot read property 'create' of undefined here in android device
})
}
在我的 vuejs 代码中。请帮帮我,在此先感谢