Hey all, was hoping you guys could help me out a bit..
What i'm trying to do:
Add "Login with ManiaConnect" to the options of a CMS login/register screen
( for example WordPress/Drupal/MyphpBB etc)
any ideas?? thanks in advance
Login to CMS through ManiaConnect
Moderator: NADEO
- BLiNNeMaNS
- Posts: 422
- Joined: 04 Jul 2011, 22:24
- Contact:
- BLiNNeMaNS
- Posts: 422
- Joined: 04 Jul 2011, 22:24
- Contact:
Re: Login to CMS through ManiaConnect
what i tried to do:
edit:
guess my 1st idea was the best after all...
Found a great one called HybridAuth which kinda works as a communication handler.
unfortunately i'm still puzzled on how to set it up.
(sent a pm to gouxim, hope to get some more info soon)
- take maniaconnect
- port it to another oauth2 api
- use a plugin based on that other api to login
- write own plugin
- login with maniaconnect
- override login authentication with custom one
edit:
guess my 1st idea was the best after all...
Found a great one called HybridAuth which kinda works as a communication handler.
unfortunately i'm still puzzled on how to set it up.
(sent a pm to gouxim, hope to get some more info soon)
Re: Login to CMS through ManiaConnect
It's better to ask your full question directly here than in PM.
You should be able to use anyt OAuth 2.0 compatible version.
We built our service on a quite old revision of the OAuth 2.0 draft so a few adjustments may have to be done on your side.
What errors did you get ? Any code to show us ?
You should be able to use anyt OAuth 2.0 compatible version.
We built our service on a quite old revision of the OAuth 2.0 draft so a few adjustments may have to be done on your side.
What errors did you get ? Any code to show us ?
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
- BLiNNeMaNS
- Posts: 422
- Joined: 04 Jul 2011, 22:24
- Contact:
Re: Login to CMS through ManiaConnect
My main problem is the fact i've got a short attention span(adhd) when it comes to reading dry text without visuals. That's why i'm more of an interface builder with basic knowledge of coding and a good friend called google.magnetik wrote:It's better to ask your full question directly here than in PM.
What errors did you get ? Any code to show us ?
The 3 examples added to the webservices sdk work great. Login does the trick, no errors at all.
Problem is the implementation of the outcome.
(letting the cms know the user is logged in, bypassing the login screen and, if available, assign user privileges)
I've been doing the wrong thing all the time, this is probably how i should do it
- user clicks login button
- maniaconnect oauth handles user validation
- maniaconnect sends user to backlink
- backlink extracts username + checks if screenname's still same
- username + screenname (the $fc0$w$0username) is added to database
- other info is added to Localstorage/Sessionstorage
- Pingback to maniaconnect
- maniaconnect checks if user is logged in
- if valid, bypass login and grant access
- site checks user role and assigns privileges
small update:
decided not to run wordpress after all.
Although wordpress has maniapress, i think i'll pass and write my own templating system instead.
will keep you posted.
I do have a question though:
- is it possible to check if a user has bought the game or is a free account player?
(only allow post access to those ppl i can remove rights from if they misbehave without them just registering a new account and troll the site again)
Re: Login to CMS through ManiaConnect
Yes indeed the difficulty will be here. It will depend what CMS you use (wordpress, custom, whatever), but in any case it will be on your side rather than Nadeo's (ie. maniaconnect's side).BLiNNeMaNS wrote:but "bypassing the login screen"
Maybe you can find help in the forum from other players to help you achieve what you want to do.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 

- BLiNNeMaNS
- Posts: 422
- Joined: 04 Jul 2011, 22:24
- Contact:
Re: Login to CMS through ManiaConnect
i've just come up with a workaround for the problem.
not rocksolid, but it will probably do the trick for now:
edit: would even be better if the manialink in the header would work as a domainname instead of showing the full browserpath
not rocksolid, but it will probably do the trick for now:
- load webservices/autoload.php
- check if http or maniaplanet and show content
- if http in header, don't show oauth login
- else show oauth login *ingame maniaplanet browser only*
- after succesful login, add username/id/token to seperate table, see "add content" option appear
- formfield username (mandatory) is auto filled in with username+hidden string, nickname shown
- formfield username can't be selected, username pulled from database, has to have certain hidden string
edit: would even be better if the manialink in the header would work as a domainname instead of showing the full browserpath
- BLiNNeMaNS
- Posts: 422
- Joined: 04 Jul 2011, 22:24
- Contact:
Re: Login to CMS through ManiaConnect
okay, almost there ^^
now i only need to know at what part of the session i need to write to database
now i only need to know at what part of the session i need to write to database
Who is online
Users browsing this forum: No registered users and 1 guest