-
Notifications
You must be signed in to change notification settings - Fork 1
clear http only cookies on logout #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/[email protected]Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/[email protected]"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/[email protected]"
}
}
Preview published to npm registry — try new features instantly! |
|
Claude finished @roymiloh's task —— View job PR Review: Clear HTTP-only cookies on logoutI've reviewed the changes to the logout functionality in 🔍 Summary of ChangesThe PR modifies the ✅ Code Quality
🐛 Potential Issues
⚡ Performance
🔒 Security Assessment
🧪 Test Coverage
Required test updates:
🎯 Recommendations
📝 Overall AssessmentThis is a good security improvement that addresses the limitation of client-side JavaScript not being able to clear HTTP-only cookies. The implementation is clean and maintains backward compatibility. However, the tests must be updated before this can be merged. |
|
Claude finished @roymiloh's task —— View job PR Review: Clear HTTP-only cookies on logoutI've reviewed the updated changes to the logout functionality. Here's my feedback: Todo List:
🔍 Summary of ChangesThe PR modifies the ✅ Code Quality
🐛 Potential Issues
⚡ Performance
🔒 Security Assessment
🧪 Test Coverage
Key test improvements:
📝 Implementation DetailsThe logout flow now works as follows:
🎯 Overall AssessmentThis is an excellent security improvement that properly addresses the limitation of client-side JavaScript not being able to clear HTTP-only cookies. The implementation is clean, secure, and well-tested. The test updates comprehensively cover the new behavior and maintain coverage of existing functionality. The PR is ready to merge. Great work on both the implementation and the thorough test updates! |
src/modules/auth.ts
Outdated
| const fromUrl = redirectUrl || window.location.href; | ||
|
|
||
| // Redirect to server-side logout endpoint to clear HTTP-only cookies | ||
| const logoutUrl = `${options.serverUrl}/api/apps/${appId}/auth/logout?from_url=${encodeURIComponent(fromUrl)}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use appBaseUrl instead of serverUrl
src/modules/auth.ts
Outdated
| @@ -66,4 +66,4 @@ | |||
| const providerPath = provider === "google" ? "" : `/${provider}`; | |||
| const loginUrl = `${ | |||
| options.serverUrl | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appBaseUrl
| const providerPath = provider === "google" ? "" : `/${provider}`; | ||
| const loginUrl = `${ | ||
| options.serverUrl | ||
| }/api/apps/auth${providerPath}/login?app_id=${appId}&from_url=${encodeURIComponent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/login/social/<provider id>
|
Claude finished @roymiloh's task —— View job PR Review: Clear HTTP-only cookies on logoutI've reviewed the changes to the logout functionality. Here's my comprehensive feedback: Todo List:
🔍 Summary of ChangesThe PR successfully addresses the latest review comments by changing ✅ Code Quality
🐛 Potential Issues
⚡ Performance
🔒 Security Assessment
🧪 Test Coverage
Key test improvements:
📝 Implementation DetailsThe logout implementation now:
💡 Minor SuggestionConsider updating the JSDoc comment in 🎯 Overall AssessmentThis PR successfully implements the requested changes and provides a secure, well-tested solution for clearing HTTP-only cookies on logout. The code quality is excellent, the implementation addresses all review feedback, and the test coverage is comprehensive. The change from The PR is ready to merge. Great work on implementing the review feedback and maintaining high code quality! |
|
Claude finished @roymiloh's task —— View job PR Review: Clear HTTP-only cookies on logoutI've reviewed the changes to the logout functionality. Here's my comprehensive feedback: Todo List:
🔍 Summary of ChangesThe PR successfully implements server-side logout to clear HTTP-only cookies by redirecting to a logout endpoint instead of just reloading the page. All previous review feedback regarding using ✅ Code Quality
🐛 Potential Issues
⚡ Performance
🔒 Security
🧪 Test Coverage
The tests properly verify:
📝 Implementation DetailsThe logout flow now works as follows:
💡 Minor Documentation SuggestionThe only minor improvement would be updating the JSDoc comment in the types file (if one exists) to reflect that the logout method now redirects to a server-side endpoint rather than just reloading the page. However, this is not critical for functionality. 🎯 Overall AssessmentThis is a well-implemented security enhancement that properly addresses the limitation of client-side JavaScript not being able to clear HTTP-only cookies. The code is clean, secure, thoroughly tested, and addresses all previous review feedback. The implementation follows best practices for both security and error handling. The PR is ready to merge. Excellent work on implementing a secure logout mechanism with comprehensive test coverage! |
No description provided.