Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b34a39f6e | |||
| f0513683e5 |
@@ -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
@@ -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": {
|
||||
|
||||
@@ -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 },
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user