mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-14 15:58:36 +02:00
Update OTP generation to work with new TwoFAccount model
This commit is contained in:
@ -99,7 +99,7 @@
|
||||
|
||||
getTOTP: function() {
|
||||
|
||||
this.axios.post('/api/twofaccounts/otp', {data: this.id ? this.id : this.internal_uri }).then(response => {
|
||||
this.axios.post('/api/twofaccounts/otp', { id: this.id, uri: this.internal_uri }).then(response => {
|
||||
let spacePosition = Math.ceil(response.data.otp.length / 2);
|
||||
|
||||
this.otp = response.data.otp.substr(0, spacePosition) + " " + response.data.otp.substr(spacePosition);
|
||||
@ -143,7 +143,7 @@
|
||||
|
||||
getHOTP: function() {
|
||||
|
||||
this.axios.post('/api/twofaccounts/otp', {data: this.id ? this.id : this.internal_uri }).then(response => {
|
||||
this.axios.post('/api/twofaccounts/otp', { id: this.id, uri: this.internal_uri }).then(response => {
|
||||
let spacePosition = Math.ceil(response.data.otp.length / 2);
|
||||
|
||||
this.otp = response.data.otp.substr(0, spacePosition) + " " + response.data.otp.substr(spacePosition)
|
||||
|
Reference in New Issue
Block a user