Skip to content

Commit

Permalink
fix redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
Melisa Anabella Rossi committed Dec 19, 2023
1 parent 300c312 commit bab4e9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Pages/LoginPage/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useHref } from 'react-router-dom'
import { ethers } from 'ethers'
import { AuthIdentity, Authenticator } from '@dcl/crypto'
import { ProviderType } from '@dcl/schemas/dist/dapps/provider-type'
Expand Down Expand Up @@ -63,7 +62,7 @@ export async function connectToProvider(connectionOption: ConnectionOptionType):
})

const url = new URL(window.location.href)
url.pathname = useHref({ pathname: '/callback' })
url.pathname = '/auth/callback'

await magic.oauth.loginWithRedirect({
provider: connectionOption,
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export default defineConfig(({ command, mode }) => {

return {
plugins: [react()],
server: {
open: '/auth',
},
...(command === 'build'
? {
base: envVariables.VITE_BASE_URL,
Expand Down

0 comments on commit bab4e9a

Please sign in to comment.