I think found a bug (or maybe not). If a avatar is not set a person cannot login via discord. Here is what the debug looks like.
POST https://mydomainname/register
Intervention\Image\Exception\NotReadableException: Unable to init from given url (https://cdn.discordapp.com/avatars/0.png). in file /home/pxpocvvj/forum/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php on line 84
Stack trace:
1. Intervention\Image\Exception\NotReadableException->() /home/pxpocvvj/forum/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php:84
2. Intervention\Image\AbstractDecoder->initFromUrl() /home/pxpocvvj/forum/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php:330
3. Intervention\Image\AbstractDecoder->init() /home/pxpocvvj/forum/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php:66
4. Intervention\Image\AbstractDriver->init() /home/pxpocvvj/forum/vendor/intervention/image/src/Intervention/Image/ImageManager.php:54
5. Intervention\Image\ImageManager->make() /home/pxpocvvj/forum/vendor/flarum/core/src/User/Command/RegisterUserHandler.php:139
6. Flarum\User\Command\RegisterUserHandler->uploadAvatarFromUrl() /home/pxpocvvj/forum/vendor/flarum/core/src/User/Command/RegisterUserHandler.php:121
7. Flarum\User\Command\RegisterUserHandler->applyToken() /home/pxpocvvj/forum/vendor/flarum/core/src/User/Command/RegisterUserHandler.php:93
8. Flarum\User\Command\RegisterUserHandler->handle() /home/pxpocvvj/forum/vendor/illuminate/bus/Dispatcher.php:90
9. Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}() /home/pxpocvvj/forum/vendor/illuminate/pipeline/Pipeline.php:130
10. Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() /home/pxpocvvj/forum/vendor/illuminate/pipeline/Pipeline.php:105
11. Illuminate\Pipeline\Pipeline->then() /home/pxpocvvj/forum/vendor/illuminate/bus/Dispatcher.php:98
12. Illuminate\Bus\Dispatcher->dispatchNow() /home/pxpocvvj/forum/vendor/illuminate/bus/Dispatcher.php:76
13. Illuminate\Bus\Dispatcher->dispatch() /home/pxpocvvj/forum/vendor/flarum/core/src/Api/Controller/CreateUserController.php:45
14. Flarum\Api\Controller\CreateUserController->data() /home/pxpocvvj/forum/vendor/flarum/core/src/Api/Controller/AbstractSerializeController.php:96
15. Flarum\Api\Controller\AbstractSerializeController->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Api/Controller/AbstractCreateController.php:22
16. Flarum\Api\Controller\AbstractCreateController->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Api/Client.php:72
17. Flarum\Api\Client->send() /home/pxpocvvj/forum/vendor/flarum/core/src/Forum/Controller/RegisterController.php:58
18. Flarum\Forum\Controller\RegisterController->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/RouteHandlerFactory.php:38
19. Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php:65
20. Flarum\Http\Middleware\DispatchRoute->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
21. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/fof/ban-ips/src/Middleware/RegisterMiddleware.php:93
22. FoF\BanIPs\Middleware\RegisterMiddleware->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
23. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/fof/oauth/src/Middleware/ErrorHandler.php:46
24. FoF\OAuth\Middleware\ErrorHandler->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
25. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/kilowhat/flarum-ext-audit-free/src/Middlewares/SetLoggerActor.php:28
26. Kilowhat\Audit\Middlewares\SetLoggerActor->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
27. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/ShareErrorsFromSession.php:57
28. Flarum\Http\Middleware\ShareErrorsFromSession->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
29. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/SetLocale.php:50
30. Flarum\Http\Middleware\SetLocale->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
31. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php:45
32. Flarum\Http\Middleware\CheckCsrfToken->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
33. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php:32
34. Flarum\Http\Middleware\AuthenticateWithSession->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
35. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php:51
36. Flarum\Http\Middleware\RememberFromCookie->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
37. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/StartSession.php:61
38. Flarum\Http\Middleware\StartSession->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
39. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/CollectGarbage.php:46
40. Flarum\Http\Middleware\CollectGarbage->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
41. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php:28
42. Flarum\Http\Middleware\ParseJsonBody->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
43. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php:57
44. Flarum\Http\Middleware\HandleErrors->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
45. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php:84
46. Laminas\Stratigility\MiddlewarePipe->process() /home/pxpocvvj/forum/vendor/middlewares/request-handler/src/RequestHandler.php:84
47. Middlewares\RequestHandler->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
48. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/middlewares/base-path-router/src/BasePathRouter.php:97
49. Middlewares\BasePathRouter->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
50. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php:42
51. Laminas\Stratigility\Middleware\OriginalMessages->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
52. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/middlewares/base-path/src/BasePath.php:53
53. Middlewares\BasePath->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/Next.php:61
54. Laminas\Stratigility\Next->handle() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php:84
55. Laminas\Stratigility\MiddlewarePipe->process() /home/pxpocvvj/forum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php:73
56. Laminas\Stratigility\MiddlewarePipe->handle() /home/pxpocvvj/forum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php:96
57. Laminas\HttpHandlerRunner\RequestHandlerRunner->run() /home/pxpocvvj/forum/vendor/flarum/core/src/Http/Server.php:42
58. Flarum\Http\Server->listen() /home/pxpocvvj/forum/public/index.php:26
I set a profile pic to the same account and logged in, then it worked fine.