Welcome

High quality MyBB plugins at your disposal

Hi, I am a passionate developer with modernity and simplicity in mind. MyBBoost is my mansion where you can download my plugins and themes, other than receiving support for them. Several free plugins are available as well as premium ones, all compatible with the latest MyBB releases. You can purchase and download items singularly or purchase a lifetime subscription including a combination of premium plugins and:

  • Priority support
  • Future plugins access
  • Total refund if not satisfied 1
1 Terms and conditions apply. For more informations, read the EULA.

Flyover 2.0 - GitHub Authentication not working

  • 1
  • 2
Yamakuzure Ultimate 2 Apr
#1
Hi Shade, thank you very much for your awesome plugin!

I have set up a GitHub App for authentication and tried it out.
Unfortunately the only answer I get is:

Fatal error: Uncaught TypeError: Argument 1 passed to Flyover\User\Userload() must be of the type array, boolean given, called in /www/htdocs/w0189554/forums.prydeworx.com/flyover.php on line 443 and defined in /www/htdocs/w0189554/forums.prydeworx.com/flyover/User/User.php:34 Stack trace: /www/htdocs/w0189554/forums.prydeworx.com/flyover.php(443): Flyover\User\User->load(false) #1 {main} thrown in /www/htdocs/w0189554/forums.prydeworx.com/flyover/User/User.php on line 34

The problem is, that the array $accounts is empty, and reset($accounts) then returns false. This condition isn't questioned, only whether the count is greater than 1 or not. In this case it is zero.

I tried with my GitHub credentials and with a wrong password, and tested with plain and extended redirect URI.

What could be the issue here?
Shade Administrator 2 Apr
#2
Hello, thanks for the report. A nicer error message will be prompted in the next version. It's working fine in my tests here, so I suppose either the credentials given or GitHub's tokens are incorrect. Can you confirm?
Yamakuzure Ultimate 2 Apr
#3
I tried to register a GitHub OAuth application. Unfortunately with the same result, but that seemed to be the wrong way anyway.
Shade Administrator 2 Apr
#4
Can you please reach me out on Discord? Shade#7731

Thank you
Yamakuzure Ultimate 2 Apr Edited
#5
Hello, thanks for the report. A nicer error message will be prompted in the next version. It's working fine in my tests here, so I suppose either the credentials given or GitHub's tokens are incorrect. Can you confirm?
Shade (2 Apr)
I have logged out and back in with on my GitHub Account, and am pretty sure that the password is correct.
As tokens I used "Client ID" and "Client Secret".

Can you please reach me out on Discord? Shade#7731

Thank you
Shade (2 Apr)
I do not have a discord account. But I have to go now anyway. It isn't mission critical to get the integration working right right now. ;-)
Thank you very much for your help, I'll look into it again tonight and will report back to you when I find something out.

A little update:
The error is gone and replaced by my forum telling me:

Signed API request has returned an error. HTTP error 401. Raw Provider API response: {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}.

I think I have definitely done something wrong here...
Shade Administrator 2 Apr
#6
Yes, bad credentials is usually prompted when a provider's tokens are not entered properly. Please make some screenshots of your current GitHub configuration.
Shade Administrator 2 Apr
#8
Yes, it should work. Are you sure you have entered the correct redirect URI?
Yamakuzure Ultimate 2 Apr
#9
Yes, I copied and pasted the one from the admin panel. It says to try a bare URL if the full one isn't working, which I tried, too.

I just tried something else:
1. Changed primary e-mail address on GitHub, so a different one as the one used on the forum is used.
2. Changed my username in the forum, as it was the same as on GitHub.

Still no success, but I have another idea.

(Is it a problem that I use PHP-7.2?)
Shade Administrator 2 Apr
#10
Make sure there are no blank spaces in the pasted tokens, especially towards their end. PHP 7.2 poses no issues, I'm using it too. Note that Flyover doesn't mind if you are using equal names or emails, as authentication is performed on a hashed identifier level which does not depend on them.
  • 2 participants