fix(auth): token assignment in AuthProvider (#6593)

This commit is contained in:
YANG QIA 2025-03-31 12:53:25 +08:00 committed by GitHub
parent 19a263ff5a
commit febaef9cf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,8 +13,6 @@ import React, { useEffect } from 'react';
export const AuthProvider: React.FC = (props) => {
const searchString = useLocationSearch();
const app = useApp();
useEffect(() => {
const params = new URLSearchParams(searchString);
const authenticator = params.get('authenticator');
const token = params.get('token');
@ -22,6 +20,6 @@ export const AuthProvider: React.FC = (props) => {
app.apiClient.auth.setToken(token);
app.apiClient.auth.setAuthenticator(authenticator);
}
});
return <>{props.children}</>;
};