As a relatively new user to OAuth2, I'm getting confused by a lot of the things. I need a beginner level help.
I need to authorize the user ingame to make real safe requests and sends to a PHP page. Most of my tries just give page errors though.
I already made an application in Web Services settings, I have the two IDs and a redirect page, but I don't know what to do with them.
https://doc.maniaplanet.com/web-services/oauth2
This link tells the general needed stuff, but from it I still don't know how to use it. The parameter info is too brief.
The OAuth2 links seem to work in manialink browser, although I still keep getting parameter errors. Do I need to install the webservices PHP application when I only need things from basic scope and token? Are the OAuth2 links enough to be able to authorize the user?
Example of ingame auth is hugely appreciated.
Authorization ingame (in manialink) - example?
Moderator: NADEO
- BigBang1112
- Posts: 389
- Joined: 20 Jul 2015, 12:44
- Manialink: bigbang1112
- Location: Czech Republic
- Contact:
Authorization ingame (in manialink) - example?
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
Re: Authorization ingame (in manialink) - example?
Are you providing all the params to the authorization URI?
response_type=code&client_id=...&scope=...&state=...&redirect_uri=...
response_type=code&client_id=...&scope=...&state=...&redirect_uri=...
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own.
Check out openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
Forum moderator, opinions are my own.
Check out openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
- BigBang1112
- Posts: 389
- Joined: 20 Jul 2015, 12:44
- Manialink: bigbang1112
- Location: Czech Republic
- Contact:
Re: Authorization ingame (in manialink) - example?
Ye I dont and I know that is the reason. I just don't know like what state exactly means and things ("a non predictable random string" - is this like a short time password?).
Sometimes a brief documentation doesn't help understanding and that's why I need a simple example of OAuthing that fully works.
Sometimes a brief documentation doesn't help understanding and that's why I need a simple example of OAuthing that fully works.
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
Re: Authorization ingame (in manialink) - example?
It's a random string that you generate, which will be returned later by the oauth service in the redirect URL. You can then confirm that the request originated from the right session. (ie. don't allow authorization if state in redirect URI is not the same as what you generated in the first step.)
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own.
Check out openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
Forum moderator, opinions are my own.
Check out openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
- BigBang1112
- Posts: 389
- Joined: 20 Jul 2015, 12:44
- Manialink: bigbang1112
- Location: Czech Republic
- Contact:
Re: Authorization ingame (in manialink) - example?
Oh I'm actually starting to see it shaping. I managed to authorize my own app and now I got the huge code and state, which can be used for access_token... whow. Thanks for clearing my OAuth spaces. I somehow didn't manage to see that.
I might post an example myself when I opened this topic anyway
Edit: What if I wanna redirect user to manialink? What is the proper redirect uri?
I might post an example myself when I opened this topic anyway
Edit: What if I wanna redirect user to manialink? What is the proper redirect uri?
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
- BigBang1112
- Posts: 389
- Joined: 20 Jul 2015, 12:44
- Manialink: bigbang1112
- Location: Czech Republic
- Contact:
Re: Authorization ingame (in manialink) - example?
Issue detected:
When I set the redirect_uri to a normal http:// URL, the authorization works just fine in normal browser but ingame the link fails.
Looking a bit more to the manialink code ingame, I found that the
is being changed to
Is there a solution for this or is it just a long staying bug? Can be manialink code used as a redirect?
Edit: Using dem %2F instead of slashes fixed it rather quickly, whops
When I set the redirect_uri to a normal http:// URL, the authorization works just fine in normal browser but ingame the link fails.
Looking a bit more to the manialink code ingame, I found that the
Code: Select all
&redirect_uri=http://www.
Code: Select all
&redirect_uri=http:/www.
Edit: Using dem %2F instead of slashes fixed it rather quickly, whops
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
Who is online
Users browsing this forum: No registered users and 1 guest