tomanagle / NextJS-NestJS-GraphQL-Starter

A production-ready NextJS & NestJS GraphQL starter pack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues when trying to boot server and client Starter

koakh opened this issue · comments

Hello I try to start starter again today and....

I added GITHUB_CLIENT_ID to client .env

CLIENT_BASE_URL=http://localhost:5000/graphql
WEBSOCKET_API_URL=ws://localhost:5000/graphql
GA_ID:GA-
SENTRY_DSN:
BROWSER_API_ENDPOINT:http://localhost:5000/graphql
GITHUB_CLIENT_ID:7c85dd5920..........
CLIENT_DOMAIN:http://localhost:3000
REDDIT_CLIENT_ID:

and I added GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET to server .env

# Used to sign and verify JWTs, make sure you change it to something string, or use a public & private key
SIGNING_KEY=changeThis

CORS_ORIGIN=http://localhost:3000

SENTRY_DSN=

ENGINE_API_KEY=

GA_ID=

GITHUB_CLIENT_ID=7c85dd5920..........
GITHUB_CLIENT_SECRET=8bb72cc9f8266fa1429a16f520fcd7..........

REDDIT_APP_ID=
REDDIT_APP_SECRET=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

APOLLO_GRAPH_VARIANT=apollo.graphVariant

and started, but I can't use github oauth with starter

image

other issues is the missing http://localhost:3000/logo.png

and in client the required sentry, can this be optional, seems better

Sentry Logger [Warn]: No DSN provided, backend will not do anything.

and a client error in console devtools

Warning: Prop `className` did not match. Server: "css-didk8x bb-TopNavItem" Client: "css-e52yrk bb-TopNavItem"
    in a
    in li (created by ForwardRef(Box))
    in ForwardRef(Box)
    in Unknown (created by TopNav.Item)
    in TopNav.Item (at Navigation.tsx:64)
    in Link (at Navigation.tsx:63)
    in ul (created by ForwardRef(Box))
    in ForwardRef(Box)
    in Unknown (created by TopNav.Section)
    in TopNav.Section (at Navigation.tsx:62)
    in div (created by ForwardRef(Box))
    in ForwardRef(Box)
    in Unknown (created by TopNav)

thanks again

commented

I can see in the GitHub URL that the client ID is undefined, somehow the id isn't getting through to the URL. Make sure you restart the server after updating the .env

As for missing the logo:
Add your logo file?

The sentry this is your preference, fork the repo and change it, or make a PR.

The Warning: Prop className did not match. Server: "css-didk8x bb-TopNavItem" Client: "css-e52yrk bb-TopNa... warning is because Next renders one class name on the server and another on the client. It's not an issue as far as I'm aware.

Thanks @tomanagle
I only see your answear today, I will try to follow tour tips to start project
thanks for everything

@tomanagle Make sure you restart the server after updating the .env
yes I restart server, I already double check it now, and get the same undefined in url github

seems the problem is in .env files we have : and not = and it gives some confusion, after setup everything, github and google oauth are setted and working, but when we are redirect to redirect_url, and we land in frontend nothing happens, we keep unlogged and I inspect cookies, storage etc and nothing

do you have any

if you like you can try here https://dev.koakh.com
I will keep frontend running in my machine a few hours, while I'm working

thanks @tomanagle

commented

So i did the GitHub auth and can see it's making a request to http://localhost:5000/graphql in the client. Make sure you set the GraphQL endpoint to your domain, in this case it will be https://dev.koakh.com

commented

I fixed the .env.example in the client.

It's been a while since I've worked on this so I can't remember exactly how the auth works