Skip to content
Myr

Refuse to be framed on every sign-in page, now that a kept session grants with one click

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parent f559a7b · Browse files · 2 files+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−2 removed

  • tests:+2 added−1 removed
  • other:+1 added−1 removed

2 files+3 added−2 removed

modified:apps/platform/src/auth/sign-in.ts+1 added-1 removed
184 unmodified lines
185 secure: true,186} as const;187188const BASE_CSP =189 "default-src 'none'; style-src 'unsafe-inline'; form-action 'self'";189 "default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'";190191// CSP's host grammar cannot name an IPv6 literal host, so only its scheme.192const redirectSource = (redirectUri: string) =>193 Option.fromNullishOr(URL.parse(redirectUri)).pipe(
1319 unmodified lines
modified:apps/platform/test/oauth.test.ts+2 added-1 removed
464 unmodified lines
465 });466467const alicePassword = "correct horse battery";468469const CSP = "default-src 'none'; style-src 'unsafe-inline'; form-action 'self'";469const CSP =470 "default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'";471472describe("the platform as its own OAuth authorization server", () => {473 it.live("publishes where to authorize and where to get a token", () =>474 Effect.gen(function* () {
1562 unmodified lines