Skip to content

Commit bc526c8

Browse files
committed
formatting
1 parent 6ff9c02 commit bc526c8

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/app/pages/auth/SSOTauri.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ describe('parseTauriOidcCallback', () => {
104104
});
105105

106106
it('rejects an unrelated hostname with a login path', () => {
107-
expect(
108-
parseTauriOidcCallback('moe.sable.app://evil/login?code=c1&state=s1')
109-
).toBeUndefined();
107+
expect(parseTauriOidcCallback('moe.sable.app://evil/login?code=c1&state=s1')).toBeUndefined();
110108
});
111109
});

src/app/pages/auth/SSOTauri.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ export const parseTauriOidcCallback = (
7979
// `moe.sable.app:/login?...` → hostname === '', pathname === '/login'
8080
// `moe.sable.app://login?...` → hostname === 'login', pathname === '/' or ''
8181
const hasLoginPath =
82-
callbackUrl.pathname === TAURI_OIDC_PATH ||
83-
callbackUrl.pathname === `${TAURI_OIDC_PATH}/`;
82+
callbackUrl.pathname === TAURI_OIDC_PATH || callbackUrl.pathname === `${TAURI_OIDC_PATH}/`;
8483

8584
const isSingleSlashFormat = callbackUrl.hostname === '' && hasLoginPath;
8685

0 commit comments

Comments
 (0)