code: https://srcshare.io/6491a1b1cc6480d82e7a861a
Im trying to integrate discord oauth into my laravel app, but I keep getting this error. I have no idea how to fix it.
Easily share your source code with other developers.
63 messages · Page 1 of 1 (latest)
code: https://srcshare.io/6491a1b1cc6480d82e7a861a
Im trying to integrate discord oauth into my laravel app, but I keep getting this error. I have no idea how to fix it.
Easily share your source code with other developers.
You’ll need to install a package that adds a Discord provider for Socialite.
I made one a while back: https://github.com/martinbean/socialite-discord-provider
Thank you, I had installed socialiteproviders/discord
But it seems that it didnt work
Solved
revive
Then the driver probably isn't installed or registered
I mean it works locally and the composer packages do get installed when heroku starts hosting.
Then make sure you’re installing it as an actual dependency and not a dev-dependency. Again, these “doesn’t work” messages aren’t at all helpful in helping us to help you.
it is not installed as a dev-dependency. On the host I actually get the same error, in the same exact place as the last error, which i fixed by installing your package.
So what is the actual error you’re getting, and where?
It would be found if you had installed the package.
how can i install it on the server?
my composer.json
"require": {
"php": "^8.1",
"ext-gd": "*",
"cloudinary-labs/cloudinary-laravel": "^2.0",
"cloudinary/cloudinary_php": "^2",
"doctrine/dbal": "^3.6",
"guzzlehttp/guzzle": "^7.2",
"intervention/image": "^2.7",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/socialite": "^5.6",
"laravel/tinker": "^2.8",
"laravel/ui": "^4.2",
"martinbean/socialite-discord-provider": "^1.2",
"socialiteproviders/discord": "^4.1",
"tightenco/ziggy": "^1.6"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0",
"martinbean/socialite-discord-provider": "^1.2",
"socialiteproviders/discord": "^4.1",
"laravel/socialite": "^5.6"
},
You don’t “install it on the server”. If it’s in your Composer lock file, then Heroku will install those dependencies when you deploy.
it does install it, but it doesnt work
cloudinary-labs/cloudinary-laravel .................................... DONE
remote: intervention/image .................................................... DONE
remote: laravel/sanctum ....................................................... DONE
remote: laravel/socialite ..................................................... DONE
remote: laravel/tinker ........................................................ DONE
remote: laravel/ui ............................................................ DONE
remote: martinbean/socialite-discord-provider ................................. DONE
remote: nesbot/carbon ......................................................... DONE
remote: nunomaduro/termwind ................................................... DONE
remote: socialiteproviders/manager ............................................ DONE
remote: tightenco/ziggy ....................................................... DONE
Might be conflicting with that other socialiterproviders/manager package.
umm, which package do i remove since there is no package with the name socialiteproviders/manager in my composer.json
i meant in my composer.json
here
ok
i always avoided removing it because it gave me an error.
Class "SocialiteProviders\Manager\ServiceProvider" not found
i fixed that error by removing mentions in app.php
now i'll try to push and see if it fixed the main error
welp still get the same error
i have no idea what to do
Remove the other Socialite package.
Run compose update
Commit the updated files (including the composer.lock file).
Re-deploy to Heroku.
you mean remove laravel/socialite?
socialiteproviders is removed
Right. So commit the new composer.lock file and then re-deploy.
I don’t really know what to tell you? My package registers the driver when its service provider is booted: https://github.com/martinbean/socialite-discord-provider/blob/master/src/DiscordServiceProvider.php#L18-L33
If you’ve installed in, then it’ll be registered.
Show the full output of your Heroku deploy.
Easily share your source code with other developers.
found out how to do it. I think your package isnt compatible with heroku or something, because when I uninstalled it and tried with the socialiteproviders it worked.
I think your package isnt compatible with heroku
I highly doubt that, as Martin is kinda known to be using Heroku (of having used it in the past)
A package "not being compatible with heroku" also doesn't make sense, at all
There’s nothing wrong with my package, and as Robert says, I use Heroku and have done for years. There’s nothing special about Heroku that would stop a Laravel package from working.
Proof that it’s not Heroku: https://discord-socialite-test-cf4a63ed3494.herokuapp.com/auth/discord/redirect
Martin going above and beyond to prove it's PEBKAC 😅
@cosmic trellis should be feeling lucky that I didn’t sue him like the Namecheap CEO, for disparaging the good name and reputation of my free, open source package 😅
Even fixed the TrustProxies middleware so the callback URI is valid…
…or they could just disappear offline.
Well, proved it’s not Heroku, so deleting app now as don’t fancy incurring an extra $7/month for the sake of “I told you so”.