Merge pull request #4755 from BerriAI/ui_fix_login

ui-fix: clear token when user logging in
This commit is contained in:
Ishaan Jaff 2024-07-17 11:03:43 -07:00 committed by GitHub
commit 7211bbcfab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -271,6 +271,11 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
const url = proxyBaseUrl
? `${proxyBaseUrl}/sso/key/generate`
: `/sso/key/generate`;
// clear cookie called "token" since user will be logging in again
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
console.log("Full URL:", url);
window.location.href = url;