Skip to content

Commit

Permalink
Merge pull request #1968 from neo4j/reset-memory-credentials-on-disco…
Browse files Browse the repository at this point in the history
…nnect

resetting memory credentials after disconnect
  • Loading branch information
nnecla authored May 23, 2024
2 parents db1def4 + 23804d8 commit 514f530
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/shared/modules/connections/connectionsDuck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export function getConnectionData(
return { ...data, username: memoryUsername, password: memoryPassword }
}

return data
return { ...data, username: data.username ? data.username : memoryUsername }
}

const removeConnectionHelper = (
Expand Down Expand Up @@ -652,9 +652,10 @@ export const disconnectEpic = (action$: any, store: any) => {
.merge(action$.ofType(USER_CLEAR))
.do(() => bolt.closeConnection())
.do(() => store.dispatch(resetUseDb()))
.do((action: any) =>
.do((action: any) => {
memoryPassword = ''
store.dispatch(updateConnection({ id: action.id, password: '' }))
)
})
.map(() => setActiveConnection(null))
}
export const silentDisconnectEpic = (action$: any, store: any) => {
Expand Down

0 comments on commit 514f530

Please sign in to comment.