formatting

This commit is contained in:
7w1 committed 2026-07-22 11:50:51 -05:00
1 parent 6ff9c02c39
commit bc526c83fe
2 files changed
+2 -5

No files matched your search

+1 -3
View File
@@ -104,8 +104,6 @@ describe('parseTauriOidcCallback', () => {
});
it('rejects an unrelated hostname with a login path', () => {
expect(
parseTauriOidcCallback('moe.sable.app://evil/login?code=c1&state=s1')
).toBeUndefined();
expect(parseTauriOidcCallback('moe.sable.app://evil/login?code=c1&state=s1')).toBeUndefined();
});
});
+1 -2
View File
@@ -79,8 +79,7 @@ export const parseTauriOidcCallback = (
// `moe.sable.app:/login?...` → hostname === '', pathname === '/login'
// `moe.sable.app://login?...` → hostname === 'login', pathname === '/' or ''
const hasLoginPath =
callbackUrl.pathname === TAURI_OIDC_PATH ||
callbackUrl.pathname === `${TAURI_OIDC_PATH}/`;
callbackUrl.pathname === TAURI_OIDC_PATH || callbackUrl.pathname === `${TAURI_OIDC_PATH}/`;
const isSingleSlashFormat = callbackUrl.hostname === '' && hasLoginPath;