Skip to content

Commit 42e540f

Browse files
committed
fix: Use provided auth when checking logged in user too
https://harperdb.atlassian.net/browse/STUDIO-647
1 parent d56da3d commit 42e540f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/integrations/api/instance/auth/useInstanceLoginMutation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function onInstanceLoginSubmit({
3030
password,
3131
});
3232

33-
if (!forceBasicAuth) {
33+
if (!forceBasicAuth && !authStore.checkForBasicAuth(entityId)) {
3434
// Attempt to use the login with session storage only.
3535
try {
3636
const user = await getInstanceUserInfo({ instanceClient });
@@ -48,6 +48,7 @@ export async function onInstanceLoginSubmit({
4848
username,
4949
password,
5050
};
51+
delete instanceClient.defaults.auth;
5152
const user = await getInstanceUserInfo({
5253
instanceClient,
5354
auth,

0 commit comments

Comments
 (0)