From 4cd625d07434fda485b2b43c308a4910db6c57dd Mon Sep 17 00:00:00 2001 From: Patryk Kalinowski Date: Fri, 23 Feb 2024 13:26:56 +0100 Subject: [PATCH] Fix Apple login redirect URI (#11) * Fix Apple login redirect URI * fix indentation --- src/Login.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Login.tsx b/src/Login.tsx index 50da857..26a390a 100644 --- a/src/Login.tsx +++ b/src/Login.tsx @@ -51,6 +51,7 @@ function Login() { router.navigate('/') } + const appleRedirectUri = 'http://' + window.location.host + (window.location.host.includes("github.io") ? '/demo-waas-auth' : '') const handleAppleLogin = async (response: { authorization: { id_token: string } }) => { const walletAddress = await sequence.signIn({ idToken: response.authorization.id_token, @@ -161,7 +162,7 @@ function Login() { authOptions={{ clientId: import.meta.env.VITE_APPLE_CLIENT_ID, scope: 'openid email', - redirectURI: 'https://' + window.location.host, + redirectURI: appleRedirectUri, usePopup: true, nonce: sessionHash, }}