fix(auth): prevent duplicate iflow BXAuth tokens

This commit is contained in:
hkfires
2025-12-12 19:57:19 +08:00
parent d131435e25
commit e7cedbee6e
5 changed files with 97 additions and 5 deletions

View File

@@ -107,7 +107,7 @@ func (a *IFlowAuthenticator) Login(ctx context.Context, cfg *config.Config, opts
return nil, fmt.Errorf("iflow authentication failed: missing account identifier")
}
fileName := fmt.Sprintf("iflow-%s.json", email)
fileName := fmt.Sprintf("iflow-%s-%d.json", email, time.Now().Unix())
metadata := map[string]any{
"email": email,
"api_key": tokenStorage.APIKey,