mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
Inline
This commit is contained in:
parent
ba20fd4763
commit
aed516988f
@ -16,11 +16,10 @@ import React, { useEffect } from "react";
|
||||
const Page: React.FC = () => {
|
||||
const router = useRouter();
|
||||
|
||||
const init = async () => {
|
||||
// get response from query params
|
||||
useEffect(() => {
|
||||
// Extract response from query params
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
const response = searchParams.get("response");
|
||||
|
||||
if (!response) return;
|
||||
|
||||
saveCredentials(response);
|
||||
@ -28,10 +27,6 @@ const Page: React.FC = () => {
|
||||
const redirectURL = InMemoryStore.get(MS_KEYS.REDIRECT_URL);
|
||||
InMemoryStore.delete(MS_KEYS.REDIRECT_URL);
|
||||
router.push(redirectURL ?? PAGES.ROOT);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
init();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@ -62,7 +57,6 @@ const saveCredentials = (response: string) => {
|
||||
// don't yet have keys to encrypt it, the account itself is being created
|
||||
// as we go through this flow.
|
||||
//
|
||||
//
|
||||
// - The encrypted `encryptedToken` will be present otherwise (i.e. if the
|
||||
// user is signing into an existing account).
|
||||
const { keyAttributes, encryptedToken, token, id } = decodedResponse;
|
||||
|
Loading…
x
Reference in New Issue
Block a user