Open Supernova3339 opened 1 year ago
Can you share the exact error message? Is there any entry in Flarum or Laravel log file or is it just shown on the page?
Any difference when trying again with debug enabled in config.php
?
Are you able to perform a request to your Laravel app from the command line on the Flarum server? like curl <Laravel homepage URL>
Hi, similar problem here.
The exact error message is OP's title. Here is the stack trace if that helps :
flarum.ERROR: UnexpectedValueException: Invalid response received from Authorization Server. Expected JSON. in /var/www/web/vendor/league/oauth2-client/src/Provider/AbstractProvider.php:885
The process seems straightforward at first but it is unclear really. Does Passport require an auth scaffolding ? Initially it complained the "login" route didn't exist. I installed laravel/ui and now I see a small window where I can login, but the error appears after I try to login.
Enabling debug shows the stack trace in Ignition in said small login window.
They are both installed on the same server and can reach each other.
Do I have to install Flarum on the Passport side too ? So far I only see the user created in Passport, but they don't appear in the Flarum users. How do you handle user-specific permissions or other interactions ? Eg. how do I make a Passport-authenticated user mod or admin, or PM them ?
So many questions... I hoped OAuth2 handled these questions.
Bug Report
Current Behavior Gets invalid JSON response and throws error
Steps to Reproduce
Expected Behavior
Response is successful and redirects with user authenticated
Screenshots Not needed to reproduce
Environment
Possible solution(s)
Additional Context This issue is present on Flarum 1.8.0