mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(auth): token assignment in AuthProvider
(#6593)
This commit is contained in:
parent
19a263ff5a
commit
febaef9cf9
@ -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}</>;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user