feat: update
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import type { TicketInfoType, TokenInfoType } from 'react-rotate-captcha'
|
import type { TicketInfoType, TokenInfoType } from 'react-rotate-captcha'
|
||||||
import { handle } from './canvas'
|
import { handle } from './canvas'
|
||||||
import * as crypto from 'crypto'
|
|
||||||
import wallhaven from '@/assets/images/wallhaven.jpg'
|
import wallhaven from '@/assets/images/wallhaven.jpg'
|
||||||
export type ActionType = {
|
export type ActionType = {
|
||||||
code: 0 | 1
|
code: 0 | 1
|
||||||
@@ -82,7 +81,7 @@ export async function verify(token: string, deg: number): Promise<TicketInfoType
|
|||||||
const success = token === tokenRaw && Math.abs(deg - angle) <= 5
|
const success = token === tokenRaw && Math.abs(deg - angle) <= 5
|
||||||
|
|
||||||
info.sid = Math.random().toString(36).slice(-8)
|
info.sid = Math.random().toString(36).slice(-8)
|
||||||
info.ticket = crypto.randomUUID()
|
// info.ticket = crypto.randomUUID()
|
||||||
|
|
||||||
return angle >= 0 && success
|
return angle >= 0 && success
|
||||||
? {
|
? {
|
||||||
|
Reference in New Issue
Block a user