Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Read Token from Param

mngshm5f2e18c25ff6
diff --git a/infra/staff/src/App.tsx b/infra/staff/src/App.tsx
index db5a1ca9a1..2a754f3bd0 100644
--- a/infra/staff/src/App.tsx
+++ b/infra/staff/src/App.tsx
@@ -232,6 +232,15 @@ const App: React.FC = () => {
) => {
setTabValue(newValue);
};
+ useEffect(() => {
+ const searchParam = new URLSearchParams(window.location.search);
+ const userToken = searchParam.get("token");
+
+ if (userToken) {
+ setLocalToken(userToken);
+ setToken(userToken);
+ }
+ }, []);
return (
<div className="container">