feat: sign in to IMVU for Access Pass products
CI / build (pull_request) Successful in 21s
CI / image (pull_request) Skipped
Pull request / title (pull_request) Successful in 1s

The importer signs in with the first of the console's accounts that IMVU takes, reports refusals and whether the
account has Access Pass, and keeps the session so restarts don't sign in again. With it, it lists whole shops
signed in for the hub ("list" jobs) and looks up products the hub can't see before importing them, so Access Pass
products import too. IMVU's sign-in works only with a desktop browser's User-Agent, which signed-in requests send.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-11-08 07:39:02 -08:00
1 parent dd8205602c
commit 7dfbeb5ba3
11 files changed
+1001 -24

No files matched your search

+17 -1
View File
@@ -8,6 +8,7 @@ import (
"os"
"path/filepath"
"sync"
"time"
)
// FileName is the store's file in the data folder.
@@ -19,6 +20,8 @@ type Account struct {
IMVUID int64 `json:"imvuId"`
Username string `json:"username"`
Sealed string `json:"sealed"`
// When IMVU last refused the sign-in with this password (zero: never): it isn't tried again for a while.
RefusedAt time.Time `json:"refusedAt,omitzero"`
}
// Store is the accounts file.
@@ -56,7 +59,7 @@ func (s *Store) Get(id string) (Account, bool) {
return a, ok
}
// Put keeps an account (replacing its password, if it had one).
// Put keeps an account (replacing its password, if it had one; a new password may be tried at once).
func (s *Store) Put(a Account) error {
s.mu.Lock()
defer s.mu.Unlock()
@@ -64,6 +67,19 @@ func (s *Store) Put(a Account) error {
return s.save()
}
// Refused records that IMVU refused the account's sign-in (with its current password).
func (s *Store) Refused(id string, at time.Time) error {
s.mu.Lock()
defer s.mu.Unlock()
a, ok := s.byID[id]
if !ok {
return nil
}
a.RefusedAt = at
s.byID[id] = a
return s.save()
}
// Keep forgets every account not in ids (the hub no longer lists them) and returns how many it forgot.
func (s *Store) Keep(ids map[string]bool) (int, error) {
s.mu.Lock()