DMXzone Visual App Designer for Framework 7 Support Product Page

Answered

Add a DMX Security Login to App

Asked 03 Jun 2015 18:12:56
2
have this question
03 Jun 2015 18:12:56 Brad Lawryk posted:
Is it possible to add a login system to the app? I see in the CSS there is rules for a login form but I am unable to find how to insert one.

Replies

Replied 04 Jun 2015 08:24:41
04 Jun 2015 08:24:41 Teodor Kuduschiev replied:
Hello Brad,

You can insert form inputs the following way:
1. Add List Block in your Page Content
2. Add List Elements
3. Right Click the List Elements -> Add Form Input.
When you add an input you can select its type: text, password, email etc..

If you wish to use those with the security provider extension you should:
1. Setup site security provider for the remote data API site and protect the data source there.
2. Wrap your inputs in a form tag with a name and ID and add a submit button (unfortunately you have to do this manually in code view) in the current version of the visual app builder, we will see how this can be improved in the upcoming updates.
3. Setup page security provider executor on the app page:
- In the site field select your remote data API site
- Select Custom Login Form
- Select your form custom fields

That's all.
Replied 04 Jun 2015 17:12:27
04 Jun 2015 17:12:27 Brad Lawryk replied:
Thanks Teodor,

I should be able to copy and paste any of the structures in the Framework 7 docs and they should work?

www.idangero.us/framework7/docs/#.VXCGw2AwdRE
Replied 04 Jun 2015 17:17:09
04 Jun 2015 17:17:09 Teodor Kuduschiev replied:
Yes, most of the HTML code copied from there should be working fine.
Replied 04 Jun 2015 23:22:59
04 Jun 2015 23:22:59 Brad Lawryk replied:
Back on the Authentication topic, is there a way to set the login session time if inactive? Seems that if the user doesn't log out they will be logged in indefinately?
Replied 05 Jun 2015 08:43:51
05 Jun 2015 08:43:51 Teodor Kuduschiev replied:
Well, that's controlled by the site security provider:
Replied 12 Aug 2015 22:25:38
12 Aug 2015 22:25:38 Brad Lawryk replied:
Not sure what I am doing wrong but I just can't get the login form to submit. Probably something very simple.

<form method="post" name="appLogin" id="appLogin">
<div class="list-block">
<ul>
<li class="item-content">
<div class="item-inner">
<div class="item-title label">User ID</div>
<div class="item-input">
<input type="text" name="username" placeholder="Your 10 Digit Id #">
</div>
</div>
</li>
<li class="item-content">
<div class="item-inner">
<div class="item-title label">Password</div>
<div class="item-input">
<input type="password" name="password" placeholder="Your password">
</div>
</div>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li class="item-content" style="width:95%"><input name="appLoginSubmit" type="submit" id="appLoginSubmit" title="Submit" value="Log In to WorkBC PG App" class="button color-white bg-blue"></li>
</ul>
</div>
</form>
Replied 12 Aug 2015 22:39:06
12 Aug 2015 22:39:06 Brad Lawryk replied:
getting closer .... form now submits but does not authenticate.

<form name="appLogin" id="appLogin">
<div class="list-block">
<ul>
<li class="item-content">
<div class="item-inner">
<div class="item-title label">User ID</div>
<div class="item-input">
<input type="text" name="username" placeholder="Your 10 Digit Id #">
</div>
</div>
</li>
<li class="item-content">
<div class="item-inner">
<div class="item-title label">Password</div>
<div class="item-input">
<input type="password" name="password" placeholder="Your password">
</div>
</div>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li class="item-content">
<button type="submit" class="button color-white bg-blue" style="width:95%">Log In to WorkBC PG App</button>
</li>
</ul>
</div>
</form>
Replied 13 Aug 2015 11:47:20
13 Aug 2015 11:47:20 Teodor Kuduschiev replied:
Hello Brad,
Could you please provide a link to your page, where we can check this?
Replied 13 Aug 2015 14:22:18
13 Aug 2015 14:22:18 Brad Lawryk replied:
Do you mean the API site? The app pages itself aren't uploaded to a server, it's not a website. It's only an app. Does the app pages also have to be a website? I know the API needs to be online.
Replied 13 Aug 2015 14:23:06
13 Aug 2015 14:23:06 Teodor Kuduschiev replied:
I need access to the html file, that you pack as an app ... You can also send it to
Replied 13 Aug 2015 14:30:42
13 Aug 2015 14:30:42 Brad Lawryk replied:
Just about to head to the office, I'll get that file to you in a few minutes.
Replied 13 Aug 2015 15:10:51
13 Aug 2015 15:10:51 Brad Lawryk replied:
Email sent. Would it help to set you up in Test Flight so that you can test the app as well?
Replied 13 Aug 2015 15:13:33
13 Aug 2015 15:13:33 Teodor Kuduschiev replied:
It would be good to provide the login details, so i can test the page, when i receive your email. Thanks!
Replied 13 Aug 2015 15:25:42
13 Aug 2015 15:25:42 Brad Lawryk replied:
Email sent with login credentials
Replied 13 Aug 2015 15:46:39
13 Aug 2015 15:46:39 Teodor Kuduschiev replied:
I see some issue with the file not found on your api site. It looks to me there is some issue with "paths relative to:" settigs.
The error i see is:
Quote Fatal error: require_once(): Failed opening required '/homepages/35/d280850650/htdocs/workbcpgapi/dmxSecurityProviders/ScriptLibrary/dmxDatabaseConnector/sqlBuilder.php' (include_path='.:/usr/lib/php5.4') in /homepages/35/d280850650/htdocs/workbcpgapi/dmxSecurityProviders/dmxSiteSecurity.php on line 4

Please make sure the remote API site is using paths relative to file, or make sure the parent path is properly defined if you are using paths relative to root.
Then please reapply (open and click Apply) the security provider on the API site.
Replied 13 Aug 2015 18:11:13
13 Aug 2015 18:11:13 Brad Lawryk replied:
Thank you! You are a life saver!

Reply to this topic