#invalid OAuth2 redirect_url

1 messages · Page 1 of 1 (latest)

untold escarp
#

I have set the redirect url to https://metrohosting.site/auth/callback

untold escarp
#

500 | SERVER ERROR

merry crest
#

Send discord oAuth link

untold escarp
#
merry crest
#

This is callback url of your CtrlPanel

untold escarp
#

oAuth?

#

hmm

untold escarp
merry crest
#

Click Link account button, and send link of the page where invalid OAuth2 redirect_url occurs

untold escarp
#

okay

untold escarp
#

Hello?

#

Is it possible to be fixed?

merry crest
#

Send logs

untold escarp
#

what was the command to put into ptero.co?

#

here you go xD

untold escarp
#

is this what you meant?

merry crest
#

Try go to /admin/overview/sync

untold escarp
fallen lintel
untold escarp
#

oh okay

#

it took me here

fallen lintel
#

yes

untold escarp
#

"Pterodactyl Synced"

fallen lintel
#

yes

untold escarp
#

But the issue is still there

fallen lintel
#

what issue

untold escarp
#

500 | SERVER ERROR

fallen lintel
#

when dooes that happen

restive marshBOT
# untold escarp 500 | SERVER ERROR

Can you please fetch the error logs, so we can assist you better regarding this error.
tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99

fallen lintel
#

yea i can read

#

when does that happen

untold escarp
fallen lintel
#

it looks like you haven't setup discord correctly

untold escarp
#

let me record a quick video

restive marshBOT
#

It seems that you haven't set up discord 0auth correctly, but fear not, the docs come to the rescue! https://CtrlPanel.gg/docs/Installation/additional-configuration#discord-auth

Extra information about URL Formatting
Any URL saved in your settings should never end with a /slash; CtrlPanel adds this / automatically to any URL, adding an extra
/ will break the URL!

GOOD Example:
https://CtrlPanel.gg
BAD EXAMPLE:
https://CtrlPanel.gg/

When configuring discord-auth, we will automatically use your APP_URL to create the appropriate URLs needed for discord-0auth. Make sure your URLs are correct!

When using SSL-Encryption (https://) double-check that all your URLs start with https:// instead of http://

After editing the .env File you have to clear the Cache:

php artisan cache:clear
php artisan config:clear
fallen lintel
#

i dont need

#

discord is not configured correctlyt

#

read the bot message

untold escarp
#

it doesn't end with slash

fallen lintel
#

ok?

untold escarp
#

my url is correct

fallen lintel
#

you can't go to that link manually

#

discord has to bring you there

#

when you login, it will add some stuff to the url

#

if you got your client_id and client_secret setup, and configured the redirect needed

#

you can go to the profile page and do the discord login

untold escarp
#

is it supposed to be like this? (Please don't hate on me, I'm just dumb this much)

fallen lintel
untold escarp
#

So i'm correct

fallen lintel
#

you configured your client_id and client_secret within ctrlpanel?
you added the link to discord like the example shows?

untold escarp
#

yes

fallen lintel
#

okay so what happens when you click on the discord login bit? assuming the client and secret are valid?

#

are you behind a cloudflare proxy?

untold escarp
#

Yes the store is behind a cloudflare proxy

fallen lintel
#

`okay so what happens when you click on the discord login bit? assuming the client and secret are valid?``

Yes the store is behind a cloudflare proxy
did you setup full strict within cloudflare?

untold escarp
#

Yes

fallen lintel
#

?

untold escarp
#

Yes I set it to "full strict"

fallen lintel
#

x3 now: okay so what happens when you click on the discord login bit? assuming the client and secret are valid?

untold escarp
#

and when i click on authorize it shows the "500 | SERVER ERROR" PAGE

restive marshBOT
fallen lintel
#

can you get the logs plz?

restive marshBOT
# fallen lintel can you get the logs plz?

Can you please fetch the error logs, so we can assist you better regarding this error.
tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99

untold escarp
#

Sure

fallen lintel
#

when i go to the discord login you send it does in fact add the code and state to the url which is needed

untold escarp
fallen lintel
#

so i'm not quite sure what the problem is

#

mmm unfortunatly this error is pretty shitty and i don't know what to make of it

untold escarp
#

oh

fallen lintel
#

did you already clear all caches while configuring?

php artisan cache:clear php artisan config:clear

untold escarp
#

Not really

fallen lintel
#

you should do that and try again and see what happens 🙂

untold escarp
fallen lintel
#

you need to execute these commands in the project root

untold escarp
#

alright

fallen lintel
#

not add sudo

#

you are also already root man

#

you need to execute these commands in the folder you installed ctrlpanel at

untold escarp
#

oh okay

fallen lintel
#

ofc there is no artisan file in your root directory

untold escarp
#

let me find it

fallen lintel
#

it's odd that your url on the left screenshot

#

has no additional query params

untold escarp
#

it has

fallen lintel
#

if you go to this route without params you get an error

untold escarp
#

its just opera hiding it

fallen lintel
#

aah lame,

#

mmm sorry i don't really know what the problem is, the error of the package is to vague for me to check

#

it would require more debugging at location, it also has worked for like 2 years now so i don;t know why it ain't working for you unfortunatly

untold escarp
#

oh

#

okay i guess, thank you for your help

fallen lintel
#

the only last thing you could try is

  1. check if your nginx config for ctrlpanel is using php8.1
  2. restart the php-fpm (you can google or ask gpt for the exact command)
  3. rm -rf vendor and composer install --no-dev --optimize-autoloader (inside the project root like earlier)

otherwise i have no clue, unfortunatly that package throws the most useless error

#

i can only guess that the client_secret might be incorrect

#

you can try and refresh that one aswel

#

i g2g, wish you the best of luck

untold escarp
#

yeah man it was it