Compare commits

..

2 Commits

Author SHA1 Message Date
diegosouzapw 6b34a39f6e chore(release): bump version to v1.0.10 and update changelog 2026-02-21 12:35:37 -03:00
diegosouzapw f0513683e5 fix(qwen): extract email from id_token to allow multiple accounts 2026-02-21 12:22:56 -03:00
3 changed files with 37 additions and 7 deletions
+12
View File
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [1.0.10] — 2026-02-21
> ### 🐛 Bugfix — Multi-Account Support for Qwen
>
> Solves the issue where adding a second Qwen account would overwrite the first one.
### 🐛 Bug Fixes
- **OAuth Accounts** — Extracted user email from the `id_token` using JWT decoding for Qwen and similar providers, allowing multiple accounts of the same provider to be authenticated simultaneously instead of triggering the fallback overwrite logic ([#99](https://github.com/diegosouzapw/OmniRoute/issues/99))
---
## [1.0.9] — 2026-02-21
> ### 🐛 Hotfix — Settings Persistence
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "omniroute",
"version": "1.0.9",
"version": "1.0.10",
"description": "Smart AI Router with auto fallback — route to FREE & cheap models, zero downtime. Works with Cursor, Cline, Claude Desktop, Codex, and any OpenAI-compatible tool.",
"type": "module",
"bin": {
+24 -6
View File
@@ -1,4 +1,5 @@
import { QWEN_CONFIG } from "../constants/oauth";
import { decodeJwt } from "jose";
export const qwen = {
config: QWEN_CONFIG,
@@ -45,10 +46,27 @@ export const qwen = {
data: await response.json(),
};
},
mapTokens: (tokens) => ({
accessToken: tokens.access_token,
refreshToken: tokens.refresh_token,
expiresIn: tokens.expires_in,
providerSpecificData: { resourceUrl: tokens.resource_url },
}),
mapTokens: (tokens) => {
let email = null;
let displayName = null;
if (tokens.id_token) {
try {
const decoded = decodeJwt(tokens.id_token);
email = decoded.email || decoded.preferred_username || null;
displayName = decoded.name || email;
} catch (e) {
// Ignore
}
}
return {
accessToken: tokens.access_token,
refreshToken: tokens.refresh_token,
expiresIn: tokens.expires_in,
idToken: tokens.id_token,
email,
displayName,
providerSpecificData: { resourceUrl: tokens.resource_url },
};
},
};