Skip to content

[FEATURE] extend error scenarios #13

@chrisw-dev

Description

@chrisw-dev

Summary

After re-running the previously skipped OAuth error scenario tests, we discovered that the mock OAuth server has been partially updated and now supports some error scenarios!

Test Results

✅ Tests Now Passing (10 total)

Basic OAuth Flow (7 tests):

  1. ✅ should complete OAuth flow with mock server
  2. ✅ should receive session cookie after authentication
  3. ✅ should show user information on dashboard
  4. ✅ should be able to logout
  5. ✅ should redirect to dashboard after login
  6. ✅ Basic Page Navigation: should load home page
  7. ✅ Basic Page Navigation: should have navigation links on home page

OAuth Error Scenarios (3 tests - NOW WORKING!):
8. ✅ should handle OAuth access denied error ⭐ NEW
9. ✅ should handle server error from OAuth provider ⭐ NEW
10. ✅ should handle token endpoint error ⭐ NEW

⏭️ Tests Still Skipped (7 total)

Requires mock OAuth server improvements:

  1. ⏭️ should redirect to login when accessing dashboard without authentication

    • Issue: Navigating to /dashboard without auth still completes OAuth flow
    • Needs: Proper unauthenticated redirect handling
  2. ⏭️ should handle unauthorized client error

    • Issue: Error scenario not properly blocking authentication
  3. ⏭️ should handle invalid scope error

    • Issue: Error scenario not properly blocking authentication
  4. ⏭️ should handle temporarily unavailable error

    • Issue: Error scenario not properly blocking authentication
  5. ⏭️ should handle invalid request error

    • Issue: Error scenario not properly blocking authentication
  6. ⏭️ should handle unsupported response type error

    • Issue: Error scenario not properly blocking authentication
  7. ⏭️ should recover from error scenario when disabled

    • Issue: Depends on other error scenarios working first

Mock OAuth Server Status

Current Version:

Error Scenarios - Support Status:

Error Type Status Notes
access_denied ✅ WORKS Properly blocks auth and redirects
server_error ✅ WORKS Properly handled
Token endpoint errors ✅ WORKS invalid_grant working
unauthorized_client ❌ FAILS Still auto-approves
invalid_scope ❌ FAILS Still auto-approves
temporarily_unavailable ❌ FAILS Still auto-approves
invalid_request ❌ FAILS Still auto-approves
unsupported_response_type ❌ FAILS Still auto-approves

Progress

Before (original issue):

  • 9 tests failing
  • 1 test skipped
  • 7 tests passing

After mock OAuth update:

  • 0 tests failing ✨
  • 7 tests skipped (waiting on mock OAuth improvements)
  • 10 tests passing ✅ (+3 new passing tests!)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions