Skip to content

Commit 514f530

Browse files
authored
Merge pull request #1968 from neo4j/reset-memory-credentials-on-disconnect
resetting memory credentials after disconnect
2 parents db1def4 + 23804d8 commit 514f530

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/shared/modules/connections/connectionsDuck.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export function getConnectionData(
193193
return { ...data, username: memoryUsername, password: memoryPassword }
194194
}
195195

196-
return data
196+
return { ...data, username: data.username ? data.username : memoryUsername }
197197
}
198198

199199
const removeConnectionHelper = (
@@ -652,9 +652,10 @@ export const disconnectEpic = (action$: any, store: any) => {
652652
.merge(action$.ofType(USER_CLEAR))
653653
.do(() => bolt.closeConnection())
654654
.do(() => store.dispatch(resetUseDb()))
655-
.do((action: any) =>
655+
.do((action: any) => {
656+
memoryPassword = ''
656657
store.dispatch(updateConnection({ id: action.id, password: '' }))
657-
)
658+
})
658659
.map(() => setActiveConnection(null))
659660
}
660661
export const silentDisconnectEpic = (action$: any, store: any) => {

0 commit comments

Comments
 (0)