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: 809
Joined: 15 Mar 2011, 16:59

In-game OAuth2 authentication not working

Post by TGYoshi » 25 Sep 2018, 17:39

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: 253
Joined: 20 Jul 2015, 12:44
Location: Český Krumlov, Czech Republic
Contact:

Re: In-game OAuth2 authentication not working

Post by BigBang1112 » 08 Oct 2018, 23:33

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.

User avatar
TGYoshi
Posts: 809
Joined: 15 Mar 2011, 16:59

Re: In-game OAuth2 authentication not working

Post by TGYoshi » 12 Oct 2018, 22:16

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: 1644
Joined: 01 Feb 2012, 19:13
Location: Paris
Contact:

Re: In-game OAuth2 authentication not working

Post by magnetik » 15 Oct 2018, 16:58

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!

Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 0 guests