mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 19:36:36 +08:00
fix: enforce license-backed user capacity
This commit is contained in:
@@ -33,13 +33,6 @@ export interface LicenseStatus {
|
||||
message?: string
|
||||
}
|
||||
|
||||
/** Generate a short device fingerprint from browser/OS info. */
|
||||
function deviceFingerprint(): string {
|
||||
const nav = window.navigator
|
||||
const parts = [nav.hardwareConcurrency, nav.language, screen.width, screen.height]
|
||||
return btoa(parts.join('|')).slice(0, 32).replace(/[+/=]/g, '')
|
||||
}
|
||||
|
||||
// ── API methods ──
|
||||
|
||||
export const licenseAPI = {
|
||||
@@ -48,8 +41,6 @@ export const licenseAPI = {
|
||||
api
|
||||
.post<LicenseActivation>('/license/activate', {
|
||||
key: key.trim(),
|
||||
device_id: deviceFingerprint(),
|
||||
device_name: navigator.platform || 'Web Client',
|
||||
})
|
||||
.then((r) => r.data),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user