Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 82

NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
03/07/14 09:01 PM (10 years ago)

PHP Authentication script for Login Screen (BT3 Hosted)

Does anyone have a link for an example of a PHP script to use for authentication with the BT Login Screen on BT Hosted App? Would like to use a Login ID that is NOT an Email Address... The idea would be that a promotion code that could be sent out that enabled multiple users to log into the app with the same Login ID (and not require an email). I realize that the PHP script would be simple, but have not written one yet. For example: ========= Control Panel JSON ==================== "labelLogInId":"ID", "labelPassword":"Password", "dataURL":"http://www.mysite.com/authenticate.php?&logInId=[userLogInId]&logInPassword=[userLogInPassword]" ================================================= userLogInId Discounts logInPassword MarchSavings ================================================= Also- why would script need to return userEmail as in 1.5 Docs? If the login was successful, docs say the script must output exactly this result: {"result":{"status":"valid","userGuid":"uniqueIdOfUser","userDisplayName":"display name of user", "userEmail":"[email protected]"}} =================================================== Thanks!
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/10/14 08:04 PM (10 years ago)
Does anyone have a sample script that they use?
 
Weidies
Lost but trying
Profile
Posts: 63
Reg: Jan 13, 2014
Pretoria, Gaute...
7,980
like
03/11/14 12:36 PM (10 years ago)
Hi NCbuzz It seems that you may have a better idea of the login than I, maybe you can help me? I'm still very new at all of this. I would like to put a login on a menu with two options, one for clients, the other for guests. I get the app to show message of "login is required" but not to ask for username and password. I'm using the BT BD panel for authentication. What am I missing or not doing or not copying or still need to create! Do you maybe have a sample of the entry level, for me, code? Thank you.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/11/14 04:25 PM (10 years ago)
Did you add a "Login Screen" PlugIn to your App? Once that is added, the Screen or menu item that you want protected by a Login can reference that screen in the BT Control Panel. Hope that helps.
 
Weidies
Lost but trying
Profile
Posts: 63
Reg: Jan 13, 2014
Pretoria, Gaute...
7,980
like
03/12/14 05:12 AM (10 years ago)
Hi NCbuzz I think I must start from no. 1. I do have Login Screen Plugin, and it shows the message that it is protected, and I did say login required and the menu button I like to protect. But how do I get it to promp/ask for Username & Password. What am I missing? Thank you for your reply.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
03/12/14 05:16 PM (10 years ago)
When you open the LogIn Screen Plugin in the Control Panel, there is a section: "arrowAuthentication URL, Login / Password labels". Did you select "Authenticate with control panel"? After clicking, you will notice the entry created. Then hit "Save", which will save the JSON data.
 
ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
like
04/04/14 07:32 AM (10 years ago)
NCbuzz, I'm having the same problem right now. I don't want use an email address for the user. Have you had any luck?
 

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.