Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@tinyrack/tinyauth-base",
"private": true,
"version": "1.0.0",
"packageManager": "pnpm@11.9.0",
"packageManager": "pnpm@11.10.0",
"scripts": {
"dev": "pnpm --filter '@tinyrack/tinyauth-*' --parallel dev",
"test": "pnpm -r --parallel --workspace-concurrency=Infinity test && pnpm --filter @tinyrack/tinyauth-standalone test:dist",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ test('walks through TOTP setup, recovery confirmation, and close', async () => {
await fillTotpCode(screen, '123456');

await expect.element(screen.getByText('alpha-1')).toBeVisible();
await screen.getByTestId('recovery-codes-confirm').click();
screen
.getByTestId('recovery-codes-confirm')
.element()
.dispatchEvent(
new MouseEvent('click', { bubbles: true, cancelable: true }),
);
await expect
.element(screen.getByTestId('recovery-codes-submit'))
.not.toBeDisabled();
await screen.getByTestId('recovery-codes-submit').click();

await vi.waitFor(() => {
Expand Down
10 changes: 9 additions & 1 deletion packages/frontend/src/routes/setup/totp/-index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ describe('/setup/totp', () => {
await fillTotpCode(screen, '123456');

await expect.element(screen.getByText('AAAA-BBBB')).toBeVisible();
await screen.getByTestId('recovery-codes-confirm').click();
screen
.getByTestId('recovery-codes-confirm')
.element()
.dispatchEvent(
new MouseEvent('click', { bubbles: true, cancelable: true }),
);
await expect
.element(screen.getByTestId('recovery-codes-submit'))
.not.toBeDisabled();
await screen.getByTestId('recovery-codes-submit').click();

await vi.waitFor(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,9 @@ describe('GET /api/oauth/:provider/authorize', () => {

describe('Mode Validation', () => {
test('should reject invalid mode parameter', async () => {
const client = testClient(app);
const res = await client.api.oauth[':provider'].authorize.$get({
param: { provider: 'google' },
query: { mode: 'invalid_mode' },
});
const res = await app.request(
'/api/oauth/google/authorize?mode=invalid_mode',
);

// Zod validation should fail
expect(res.status).toBe(400);
Expand Down
3 changes: 2 additions & 1 deletion packages/server/src/routes/oauth/e2e-oidc-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ describe('End-to-End OIDC Account Selection Flow', () => {
test('preserves chooser continuation params through consent before issuing the selected-account code', async () => {
const client = testClient(accountSelectionApp);
const sessionCookie = await createMultiAccountSession(ACCOUNT_B.sub);
const display: 'popup' = 'popup';

const authorizeQuery = {
response_type: 'code',
Expand All @@ -1098,7 +1099,7 @@ describe('End-to-End OIDC Account Selection Flow', () => {
code_challenge_method: TEST_PKCE.codeChallengeMethod,
prompt: 'select_account consent',
max_age: '3600',
display: 'popup',
display,
response_mode: 'fragment',
login_hint: ACCOUNT_B.email,
ui_locales: 'ko en',
Expand Down
Loading