We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fffba41 + 00a5106 commit 92eea90Copy full SHA for 92eea90
src/hooks/custom-hooks/useOAuth.ts
@@ -49,7 +49,8 @@ const useOAuth = (): UseOAuthReturn => {
49
const authTokenCookie = Cookies.get('authtoken');
50
51
if (from === 'tradershub' && authTokenCookie) {
52
- localStorage.setItem('authToken', authTokenCookie);
+ const cleanedAuthToken = decodeURIComponent(authTokenCookie).replace(/^"|"$/g, '');
53
+ localStorage.setItem('authToken', cleanedAuthToken);
54
Cookies.remove('authtoken');
55
window.location.href = window.location.origin;
56
}
0 commit comments