In-game OAuth2 authentication not working

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

Post Reply
User avatar
TGYoshi
Posts: 811
Joined: 15 Mar 2011, 16:59

In-game OAuth2 authentication not working

Post 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!
=3
User avatar
BigBang1112
Posts: 389
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Re: In-game OAuth2 authentication not working

Post 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.
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
User avatar
TGYoshi
Posts: 811
Joined: 15 Mar 2011, 16:59

Re: In-game OAuth2 authentication not working

Post 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).
=3
User avatar
magnetik
Nadeo
Nadeo
Posts: 1678
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: In-game OAuth2 authentication not working

Post 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.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
TGYoshi
Posts: 811
Joined: 15 Mar 2011, 16:59

Re: In-game OAuth2 authentication not working

Post 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.
=3
User avatar
magnetik
Nadeo
Nadeo
Posts: 1678
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: In-game OAuth2 authentication not working

Post 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.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
steppie
Translator
Translator
Posts: 104
Joined: 25 Apr 2011, 21:55
Location: Denmark

Re: In-game OAuth2 authentication not working

Post 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
Image
User avatar
TGYoshi
Posts: 811
Joined: 15 Mar 2011, 16:59

Re: In-game OAuth2 authentication not working

Post 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!
=3
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest