Added configurable timeout settings to paskia-js, used in our frontend as well. The default fetch timeout has been changed to 10s from prior 1s, but we maintain 1s for auth endpoints in internal use.

This commit is contained in:
2026-04-29 20:23:38 +00:00
parent e97a2b3291
commit 232d0e1ae0
10 changed files with 55 additions and 24 deletions
+3 -2
View File
@@ -59,7 +59,7 @@
import { computed, onMounted, reactive, ref } from 'vue'
import passkey from '@/utils/passkey'
import { getSettings, uiBasePath } from '@/utils/settings'
import { apiJson, ApiError, getUserFriendlyErrorMessage } from 'paskia'
import { apiJson, ApiError, getUserFriendlyErrorMessage, settings as paskiaSettings } from 'paskia'
import { updateThemeFromSession } from '@/utils/theme'
const status = reactive({
@@ -164,7 +164,8 @@ async function exchangeCode(result) {
}
return await apiJson('/auth/api/set-session', {
method: 'POST',
headers: { 'Authorization': `Bearer ${result.exchange_code}` }
headers: { 'Authorization': `Bearer ${result.exchange_code}` },
timeout: paskiaSettings.auth_ms,
})
}