{
// Handle OAuth callback
const params = new URLSearchParams(window.location.search);
const code = params.get('code');
if (code) {
// Process OAuth callback
fetch('/api/v1/auth/claude/callback', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ code })
}).then(res => res.json()).then(data => {
if (data.token) {
localStorage.setItem('chittychain_token', data.token);
window.location.href = '/';
}
});
}
return Processing authentication...
;
}} />