Fix oidc button not showing on re-login, fix oidc re-login showing config already exists #1638 #1634

This commit is contained in:
advplyr
2025-08-16 17:55:00 -05:00
parent 7aebcd92c3
commit 4be1598eca
8 changed files with 46 additions and 24 deletions
+5 -3
View File
@@ -173,16 +173,18 @@ export default {
try {
console.log('[PdfReader] Handling refresh failure - logging out user')
const serverConnectionConfigId = this.$store.getters['user/getServerConnectionConfigId']
// Clear store
await this.$store.dispatch('user/logout')
if (this.$store.getters['user/getServerConnectionConfigId']) {
if (serverConnectionConfigId) {
// Clear refresh token for server connection config
await this.$db.clearRefreshToken(this.$store.getters['user/getServerConnectionConfigId'])
await this.$db.clearRefreshToken(serverConnectionConfigId)
}
if (window.location.pathname !== '/connect') {
window.location.href = '/connect'
window.location.href = '/connect?error=refreshTokenFailed&serverConnectionConfigId=' + serverConnectionConfigId
}
} catch (error) {
console.error('[PdfReader] Failed to handle refresh failure:', error)