Improve developer tools availability check logic

This commit is contained in:
2026-01-30 05:40:42 +00:00
parent 7c512f410f
commit 8daf9128bd
2 changed files with 5 additions and 4 deletions

View File

@@ -258,7 +258,7 @@ export function useOAuth(provider = 'challonge') {
// Calculate token expiration time (expires_in is in seconds) // Calculate token expiration time (expires_in is in seconds)
const expiresAt = Date.now() + (data.expires_in || 3600) * 1000; const expiresAt = Date.now() + (data.expires_in || 3600) * 1000;
// Store tokens // Store tokens (including permissions if provided)
const tokens = { const tokens = {
access_token: data.access_token, access_token: data.access_token,
refresh_token: data.refresh_token || null, refresh_token: data.refresh_token || null,
@@ -266,6 +266,7 @@ export function useOAuth(provider = 'challonge') {
expires_in: data.expires_in || 3600, expires_in: data.expires_in || 3600,
expires_at: expiresAt, expires_at: expiresAt,
scope: data.scope, scope: data.scope,
permissions: data.permissions || [], // Store permissions from backend
created_at: Date.now() created_at: Date.now()
}; };