Vincenk
buzztouch Evangelist
Profile
Posts: 12
Reg: Aug 10, 2013
BROOKLYN
120
09/10/13 06:27 PM (10 years ago)

How does merge field of plugin login screen work?

I'm trying to connect my app with my wordpress powered website, enabling the website's existing users to login via my app. I've very little app develop experience, so it seems the plugin "login screen" is my only choice. In its settings, under "Authentication URL, Login / Password labels" section, I enter http://www.mywebsite.com/wp-login.php, but it doesn't work. The instuction says: If you use your own authentication script the URL to that script needs to include two merge fields so your backend knows what user id / password values were entered on the mobile device. Sample custom URL: http://www.yoursite.com/authenticate.php?logInId=[userLogInId]&logInPassword=[userLogInPassword] But I don't know how to write these two merge fields, and I don't even know if I can use this PHP file. Would someone please help me? Any hint will be greatly appreciated.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/10/13 11:04 PM (10 years ago)
It might be a little easier just be to use a customURL plugin, and whisk the user off to the website login screen, and just provide access via an HTML interface. With respect to your question, the 'merge fields' are populated with data from within your app. The login script would reside on your (web) server, the one the user wishes access to. If you're using the login plugin, the [userLogInId] value and the [logInPassword] value would be those that the user provided. The sample URL can be broken down into pieces for explanation: http://www.yoursite.com/ <-- the website the user needs to authenticate on authenticate.php <-- the script YOU wrote that lives on your server. It 'should' receive the data from the URL "post/get variables" (see below) and takes those values, matches against some kind of internal database for the site, and either grants access or denies access, depending on the validity of the information provided from the query string. It uses 'php', a popular web scripting language. ?logInId=[userLogInId]&logInPassword=[userLogInPassword] <-- the 'post/get' variables. This is data provided to a web server in the form of key/value pairs. this=that. The server will take those variable values, and match them against it's internal database of users based on the information the user provided. Again, this is done via a php script that the Developer must write, or obtain. Hope this explains a little bit. Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.