Skip to content

Conversation

AliQassab
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Problem:
Users experienced a 501 "Server does not support this operation" error when:
Logging in → clicking a username → logging out → logging back in
Expected to see the profile page but got an error instead

Root Cause:
After logout, users remained on the profile page (#/profile/AS). When logging back in, the application tried to restore this profile page state, which triggered operations that caused the 501 error.

Solution:
Added navigation redirect to the logout function:

function logout() {
state.destroyState();
window.location.hash = "/"; // Redirect to home page
return { success: true };
}

- Redirect users to home page after logout instead of staying on profile page
- Resolves 501 error when logging in from profile page after logout
- Fixes CodeYourFuture#6
@AliQassab AliQassab added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Bug Report: Can't log in from profile page

1 participant