planetscale / beam

A simple message board for your organization or project
https://planetscale.com/blog/introducing-beam
MIT License
2.06k stars 141 forks source link

Error logging in #56

Closed Daniellop1 closed 2 years ago

Daniellop1 commented 2 years ago

Hey, I'm triying to login to my Beam instance but this error shows (https://beam.daniellop.me/sign-in?callbackUrl=https://beam.daniellop.me/sign-in?callbackUrl=https://beam.daniellop.me/&error=Callback)

bogdansoare commented 2 years ago

Hey @Daniellop1, could you please share the error that you are getting on your next server?

Daniellop1 commented 2 years ago

I have looked at the vercel error page and I don't have any and in the chrome developer console either.

IAmLuisJ commented 2 years ago

I would double check the callback URL you have setup. For example if you are using GitHub Auth, in the OAuth app settings you should set something like

Authorization callback URL: https://beam.daniellop.me/api/auth/callback/github

That should get your user signed in.

Daniellop1 commented 2 years ago

Hey, I have configured okta as a provider and this is the configuration I have set in my admin panel.

Captura de Pantalla 2022-03-28 a la(s) 8 13 56 a m
bogdansoare commented 2 years ago

@Daniellop1 unfortunately without some logs from your server it's hard to figure out what is the issue. Next-auth has some pretty good errors on your server https://next-auth.js.org/errors#server

juliozengcheil commented 2 years ago

hey @Daniellop1 i have the same problem with github aoth, in dev, i visit localhost:3000 it redirect me to http://localhost:3000/sign-in?callbackUrl=http://localhost:3000/ and when i click Signin with Github it redirectme same page but extended url repeated https://some.domaing.cloud/sign-in?callbackUrl=https://some.domain.cloud/sign-in?callbackUrl=https://some.domain.cloud/sign-in?callbackUrl=https://some.domain.cloud/sign-in?callbackUrl=https://some.domain.cloud/&error=Callback&error=OAuthCallback&error=OAuthCallback&error=Callback

Daniellop1 commented 2 years ago

hey @Daniellop1 i have the same problem with github aoth, in dev, i visit localhost:3000 it redirect me to http://localhost:3000/sign-in?callbackUrl=http://localhost:3000/ and when i click Signin with Github it redirectme same page but extended url repeated https://some.domaing.cloud/sign-in?callbackUrl=https://some.domain.cloud/sign-in?callbackUrl=https://some.domain.cloud/sign-in?callbackUrl=https://some.domain.cloud/sign-in?callbackUrl=https://some.domain.cloud/&error=Callback&error=OAuthCallback&error=OAuthCallback&error=Callback

Yeah, thats exactly what happens to me. But with okta and github.

juliozengcheil commented 2 years ago

@Daniellop1 unfortunately without some logs from your server it's hard to figure out what is the issue. Next-auth has some pretty good errors on your server https://next-auth.js.org/errors#server

the error i get in the url params are mostly error?error=Callback, here a screenshot of what the network receive

image

i already check the nextAuth errors server but there not that specific

bogdansoare commented 2 years ago

Without some server logs, or without a reproducible demo, it's hard to debug this. Please make sure to have the proper configuration for Okta/GitHub.

Daniellop1 commented 2 years ago

Without some server logs, or without a reproducible demo, it's hard to debug this. Please make sure to have the proper configuration for Okta/GitHub.

Hey, I've created a test account for my instance (beam.daniellop.me)

Mail: test@daniellop.me Pass: Demoaccount1.

djakish commented 2 years ago

I had the same issue, it got it fixed after i specified NEXTAUTH_URL

Daniellop1 commented 2 years ago

I have found this error that might be helpful in finding the problem. Captura de Pantalla 2022-05-29 a la(s) 2 45 13 p m

bogdansoare commented 2 years ago

@Daniellop1 could you please double-check that the database has the correct schema after you've run npx prisma db push?

Daniellop1 commented 2 years ago

I did it but i'm getting this

Captura de Pantalla 2022-06-01 a la(s) 9 36 39 p m
jgreet commented 2 years ago

Assuming you're using a PlanetScale database, you'll see that Prisma error if you attempt to make a schema change (like creating a table) to a production branch directly.

https://docs.planetscale.com/concepts/branching#development-and-production-branches

A couple of options here:

Daniellop1 commented 2 years ago

I've found the error. You can't use beam with a deployed branch. Thanks for everything.