Skip to content

Commit

Permalink
Merge pull request #543 from dappforce/deploy/basepath
Browse files Browse the repository at this point in the history
Fix nextauth url paths to include /api/auth
  • Loading branch information
teodorus-nathaniel authored Feb 15, 2024
2 parents d7de6c4 + f0fb2e8 commit ff58879
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
file: docker/mainnet-Dockerfile
push: true
build-args: |
GH_NEXTAUTH_URL=https://grill.so/c
GH_NEXTAUTH_URL=https://grill.so/c/api/auth
GH_NEXT_PUBLIC_BASE_PATH=/c
GH_NEXT_PUBLIC_SUBSTRATE_URL=https://para.subsocial.network
GH_NEXT_PUBLIC_SUBSTRATE_WSS=wss://para.subsocial.network
Expand Down
7 changes: 6 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { GoogleAnalytics } from 'nextjs-google-analytics'
import NextNProgress from 'nextjs-progressbar'
import { useEffect, useRef } from 'react'
import { Toaster } from 'react-hot-toast'
import urlJoin from 'url-join'

const PWAInstall = dynamic(() => import('@/components/PWAInstall'), {
ssr: false,
Expand Down Expand Up @@ -55,7 +56,11 @@ export default function App(props: AppProps<AppCommonProps>) {

return (
<SessionProvider
basePath={env.NEXT_PUBLIC_BASE_PATH || undefined}
basePath={
env.NEXT_PUBLIC_BASE_PATH
? urlJoin(env.NEXT_PUBLIC_BASE_PATH, '/api/auth')
: undefined
}
session={props.pageProps.session}
>
<ConfigProvider>
Expand Down

0 comments on commit ff58879

Please sign in to comment.