Browse Source

feat: accounts app passkeys login

httpjamesm 1 year ago
parent
commit
3f7a66682f

+ 6 - 0
apps/accounts/src/pages/passkeys/finish.tsx

@@ -0,0 +1,6 @@
+import PasskeysFinishPage from '@ente/accounts/pages/passkeys/finish';
+const PasskeysFinish = () => {
+    return <PasskeysFinishPage />;
+};
+
+export default PasskeysFinish;

+ 1 - 7
apps/accounts/src/pages/passkeys/flow/index.tsx

@@ -31,15 +31,9 @@ const PasskeysFlow = () => {
         // get redirect from the query params
         // get redirect from the query params
         const redirect = searchParams.get('redirect');
         const redirect = searchParams.get('redirect');
 
 
-        if (!redirect) {
-            setInvalidInfo(true);
-            setLoading(false);
-            return;
-        }
-
         const redirectURL = new URL(redirect);
         const redirectURL = new URL(redirect);
         if (process.env.NEXT_PUBLIC_DISABLE_REDIRECT_CHECK !== 'true') {
         if (process.env.NEXT_PUBLIC_DISABLE_REDIRECT_CHECK !== 'true') {
-            if (!redirectURL.host.endsWith('ente.io')) {
+            if (redirect !== '' && !redirectURL.host.endsWith('ente.io')) {
                 setInvalidInfo(true);
                 setInvalidInfo(true);
                 setLoading(false);
                 setLoading(false);
                 return;
                 return;