Page 1 of 1

In-game OAuth2 authentication not working

Posted: 25 Sep 2018, 17:39
by TGYoshi
When I try to run the client through the OAuth2 authentication process, ManiaPlanet throws this script error after the user gives permission:
https://cdn.discordapp.com/attachments/ ... nknown.png

Is this some fault on my end, or some ManiaPlanet bug? It works fine when doing the authentication through a web browser.

You can test the auth flow yourself here:

Code: Select all

https://test.mania-exchange.com/ml/award
(open in the manialink browser in-game)

Thanks!

Re: In-game OAuth2 authentication not working

Posted: 08 Oct 2018, 23:33
by BigBang1112
The error is thrown because

Code: Select all

for ManiaPlanet
is not really valid as declare ... for ... is used for storing variables to specific objects that support declare for.

You declare for object ManiaPlanet which is a non-existing object within CManiaAppBrowser or CMlBrowser.

To get around this issue, remove the mentioned

Code: Select all

for ManiaPlanet
and everything should work fine unless there isn't anything else hidden.

Re: In-game OAuth2 authentication not working

Posted: 12 Oct 2018, 22:16
by TGYoshi
The issue is that this script is in control by Nadeo, not me. This gets generated after the auth flow (and probably is supposed to redirect back).

Re: In-game OAuth2 authentication not working

Posted: 15 Oct 2018, 16:58
by magnetik
Why are you declaring theses 3 variables at the top? You cannot declare variable for ManiaPlanet.

It seems you are trying to reimplement an oauth server and not using our oauth endpoint.

Re: In-game OAuth2 authentication not working

Posted: 27 Oct 2018, 14:40
by TGYoshi
The issue is that this apparently broken code is part of Maniaplanet's side of the OAuth flow... I've not written any maniascript at all.

Re: In-game OAuth2 authentication not working

Posted: 29 Oct 2018, 08:36
by magnetik
I don't really get it :? .

The screenshot you provided is showing an error on mania-exchange.com side.

https://test.mania-exchange.com/ml/award is 404 now.

Re: In-game OAuth2 authentication not working

Posted: 06 Nov 2018, 16:38
by steppie
Hi magnetik,

I'm also wondering if anything changed on the oauth2 endpoint ingame, if I try thru a webbrowser it's working fine but ingame I'm getting error 500.
Image

Re: In-game OAuth2 authentication not working

Posted: 12 Nov 2018, 19:13
by TGYoshi
magnetik wrote: 29 Oct 2018, 08:36 I don't really get it :? .

The screenshot you provided is showing an error on mania-exchange.com side.

https://test.mania-exchange.com/ml/award is 404 now.
Apologies for this and the vagueness in the report, this pet project has been put aside for now due to time constraints on my side. A different branch is now being hosted on that site, so the link broke...

I'm not sure why it shows that the maniascript originates from the mania-exchange site either as I'm very confident I never wrote that code.

Either way, I'll debug this in more detail once I get to it and get back to this thread at some point, hopefully. Thanks for the replies so far anyway!