-
Notifications
You must be signed in to change notification settings - Fork 0
Description
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):
- ✅ should complete OAuth flow with mock server
- ✅ should receive session cookie after authentication
- ✅ should show user information on dashboard
- ✅ should be able to logout
- ✅ should redirect to dashboard after login
- ✅ Basic Page Navigation: should load home page
- ✅ 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:
-
⏭️ should redirect to login when accessing dashboard without authentication
- Issue: Navigating to /dashboard without auth still completes OAuth flow
- Needs: Proper unauthenticated redirect handling
-
⏭️ should handle unauthorized client error
- Issue: Error scenario not properly blocking authentication
-
⏭️ should handle invalid scope error
- Issue: Error scenario not properly blocking authentication
-
⏭️ should handle temporarily unavailable error
- Issue: Error scenario not properly blocking authentication
-
⏭️ should handle invalid request error
- Issue: Error scenario not properly blocking authentication
-
⏭️ should handle unsupported response type error
- Issue: Error scenario not properly blocking authentication
-
⏭️ should recover from error scenario when disabled
- Issue: Depends on other error scenarios working first
Mock OAuth Server Status
Current Version:
- Created: October 25, 2025
- Digest:
sha256:cafa3d8522d5f3147956b1bcaecaeb35493ac93ebde7674ec8b8d1be960fb6f0 - Repository: https://github.com/chrisw-dev/golang-mock-oauth2-server
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!)