Skip to content

Expand auth-oidc-pkce test coverage (unit + e2e) #5302

Description

@hardl

plugins/auth/src/auth-oidc-pkce/index.js is at 57.94% stmts / 47.45% branches. Bring it to ~80% and add pkce e2e coverage alongside legacy auth-oidc (don't replace).

Unit — one spec per uncovered method, reusing the existing oidc-client-ts event-capture mock:

  • login() / logout() success + error paths
  • addUserLoaded incl. profileStorageInterceptorFn and idToken-fallback expiration
  • _processLogoutResponse ?logout success + reject
  • _processLoginResponse early return + fallback URL construction + login-callback error → onAuthExpired
  • tryToSignIn silent-fallback branch

E2E — new Cypress spec against scripts/oidc-mockserver: login round-trip, state return-to-path, logout flow, silent-renew iframe callback. Keep legacy auth-oidc e2e untouched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    authauthorization/authentication

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions