Skip to content

Commit

Permalink
Fix Apple login redirect URI (#11)
Browse files Browse the repository at this point in the history
* Fix Apple login redirect URI

* fix indentation
  • Loading branch information
patrislav authored Feb 23, 2024
1 parent a5c41ea commit 4cd625d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
}}
Expand Down

0 comments on commit 4cd625d

Please sign in to comment.