Using Volt *simply* without complex sign on etc


#1

Hi Guys, I’m struggling with the complexity of Volt. There are several complex steps just to log in a user (from the app) before Volt will do anything. Can I circumvent this complexity just to use it as storage? I realise security is needed, but everything is encrypted anyway.

Questions Detailed:

  1. All I need is to rd/wr data on volt using managed syntax like serverStorage.setItem().
    – This syntax looks great but only returns “unauthorised”.
    – Is there a simple way of doing it without my users signing on?
  2. Assuming my users must sign on, I watched cayocoder’s tutorial, found the sample, and reviewed it’s code. COMPLEX.
    – Does all that code have to be sifted through, imported and stitched into my program before I can sign on and rd/wr data?
    – Using something like serverStorage.SignIn("username", "password"), can I sign my users in within code and then create a matching account in https://dashboard.voltcloud.io/frmApp manually?
  • When I do try to create a user at https://dashboard.voltcloud.io/frmUsers , it sends me a registration email.
    Where does that email go? (It certainly never goes to my email box :slight_smile:).
    – Is it actually trying to send something to my app? The documentation on this seems ambiguous.

  • I tried http://wiki.nsbasic.com/Log_in but all it says is showSignIn undefined (see details).

  • Is there a simple alternative to Volt (apart from Google Docs as am reviewing next) to simply read write data to the cloud?

Sorry if I am missing something really obvious. Thanks in advance!

Details..
  • I have set up a volt account and have setup Volt AppID & Domain in Properties. Dashboard Access is False (tried True).

  • I am using Volt with an app compiled in PhoneGap (George you will recall we resolved that on Can I use Volt AND PhoneGap? ). I have also tried Deploy To Volt (of course the PhoneGap extensions don’t work there, but that does not interfere with these server tests) – no change.

  • Details of the extraheaders:
    <script src='https://###.volt.live/api/client/volt.js'></script>
    <script>
      var appId = '###';
      $volt.init(appId);
    </script>
    (…above ### parts completed with priv details and thoroughly checked.)
    The 1st line was as advised in Can I use Volt AND PhoneGap? . The subsequent lines are tried from http://wiki.nsbasic.com/First_app (which doesn’t actually say do anything in AppStudio except set up an account).


#2

Sorry for the tardy reply - I misplaced this message.

Users do need to sign in. We don’t allow anonymous storage for a number of good reasons.

You could use a hardcoded password in the app - but it’ll be visible
to anyone looking at the source. That would be a simple login call: $volt.auth.login

You can copy the login code from the samples. Don’t be scared by it - it’s pretty straightforward.

We did our best to make some fairly complex issues simpler in Volt. In doing, we all here gained a real appreciation how complex it is to build a workable login system.


#3

Thanks for your response as it is much appreciated, however, using the example, things are simply not working.

I’ve used the Sign Up link to create an account. However, after following instructions (click this link, also copy and paste link), I only ever get another sign on page and when I try to sign in with the now registered details, I get “Account not confirmed. Would you like another confirmation email?

I have tried this step many times.

Please note: There are missing steps from the tutorial Volt Tutorials Collection – specifically, after deploying to Volt, you get a Dashboard link and you need to set up the “Confirm Page” therein before it will send emails to you. (And if you don’t fill it in, you do not get any warnings or prompts to advise you to).

So as according to the volt sign on sample using the form with id=frmSignOn I tried /#/frmSignOn/{{token}} … that doesn’t work. I also tried the only other Form1 so it was /#/frmSignOn/{{token}}.

  • Nb: Re above, given that the help says the “Confirm Page” should be “The Page In Your App that handles User Confirmation…”, and there is nothing matching that terminology in the sample (what is a “page”?), the help is quite ambiguous.
Other

I am getting emails from the system via the sample, but not when I set up an account in the dashboard – is there a fault? Update: The “Reset Page” link must be set up, same as “Confirm Page” mentioned prior.

FYI and as feedback, I doubt it needs to be this complex. Even PayPal does not require such complex password character combinations making memory difficult. What a user needs is a really simple way of getting data to and from an app.

Ps: It is encouraging to see I can sign people in automatically from code. I am unable to fulfil my contract without that as it must do basic server transactions without a sign in (which I will garble)! That said, I need also a “supervisor” login, so all this detail is helpful.


#4

I’d like to reproduce what you’re seeing here.

Is the Sign Up link you refer to one that is in an which you created?

Are you seeing any messages in the Chrome Debugger?

The tutorial you refer to us made by a user - it’s not an official one.

Minimum password complexity is a controversial topic these days. We designed ours around current best practices. If you want something easier to remember, you can also use a passphrase which is at least 20 characters long. I’m reminded of this:


Volt Tutorials Collection
#5

{Ref} I’d like to reproduce what you’re seeing here. thanks!

Is the Sign Up link you refer to one that is in the example yes – it is the name of one of the two forms in the SignOn example (I tried both) or which you created? no

I think this is my problem … I don’t understand what it means by a “Confirm Page” and I’m beginning to wonder if there isn’t one in that example.

Are you seeing any messages in the Chrome Debugger? _no errors see details next

[details=Details] Details of Chrome Console (when clicking on confirm link from email)… -/#/frmSignOn/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDQyNzEyNDgsI…saXZlIiwic3ViIjoiUmpvaTZ5In0.J7VoGbXInUzfZMj8zmZFjDtyoKvL5Cx6kuIZmx0Rjik:1 Document was loaded from Application Cache with manifest https://signon-realigns-utterly.volt.live/OfflineApp.appcache /#/frmSignOn/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDQyNzEyNDgsI…saXZlIiwic3ViIjoiUmpvaTZ5In0.J7VoGbXInUzfZMj8zmZFjDtyoKvL5Cx6kuIZmx0Rjik:1 Application Cache Checking event /#:1 Application Cache NoUpdate event
[/details]

The tutorial you refer to is made by a user - it’s not an official one. ****thanks, I have added a note there for others

Other

ref: Minimum password complexity is a controversial topic these days. – Thanks for commenting on that and for the great grafix. I’ve had long conversations about them myself. The point really is this … does my data contain personal details ? No. Does it contain addresses & phones? No. Does it contain bank details? Definitely not. The law here says that such data does not actually need any encryption or security :slight_smile: . That said, I know you have to protect your server. Over zealous data protection is the bane of my life. My biggest ever contract was supplying timetable info to the public. The powers that be insisted it was carried over a tripple encrypted VPN. But… I said… it’s public information! :slight_smile: . When banks brought in those idiot dongles that only work if you stand on your head singing dixie, I just moved my online banking to PayPal.


#6

Can you give me a step by step what you are doing?


#7

Sure … while I’m doing that, can you confirm that I have done the right thing with the “Confirm Page” entry in the Dashboard by setting it to /#/frmSignOn/{{token}} ? :slight_smile:


#8

I did these steps as I wrote…

  1. open NSB (6.2.7.1 Essential Monthly Edition) on Win7 Pro, 32bit.
  2. confirm the menu: Tools // Preferences // Volt tab is set to my login credentials.
  3. menu: File // Open Sample Project // BASIC, Volt Services, open “SignOn” sample.
  4. – I note that it is in Java, but assume that is not a problem. I make no changes.
  5. menu: Run // Deploy to Volt
  6. open “Your App” link in returned dialogue and get a Chrome Tab called “SignOn” with the sample in it. (URL is https://signon-prepares-questionably.volt.live/ ).
  7. Using the returned dashboard link “Manage this app in Volt”, it opens a second tab in Chrome and I set “Confirm Page” entry in the Dashboard by setting it to “/#/frmSignOn/{{token}}” (no quotes) and I click “save” therein. (URL is https://dashboard.voltcloud.io/#/app/ajClvp/frmApp )
  8. go back to the Chrome Tab called “SignOn” (where the sample is)
  9. click “Sign In” and a Modal form comes up saying “Welcome To Volt”.
  10. click Sign Up link at bottom of that form.
  11. enter email “home(at)2-info.com” (no quotes, @ sign replaces “(at)”) in the email entry.
  12. enter a password, eg, Pass1234__ (noting the 2 underscores). I enter it in the Confirm as well.
  13. tick Agree to Terms Of Service
  14. click “Create your account”
  15. it replies “An email is on its way. Follow its instructions to confirm your account.”
  16. the email arrives from which I select the link and copy it. (My email handler loses all the content after any #). I’m careful not to include extra newlines or spaces at top or bottom.
  17. I open a new Chrome tab. I paste in the URL ( https://signon-prepares-questionably.volt.live/#/frmSignOn/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1MDQyOTQ2MTksImV4cCI6MTUwNDMzNzgxOSwiYXVkIjoiL2FwaS9hdXRoL2NvbmZpcm0iLCJpc3MiOiJzaWdub24tcHJlcGFyZXMtcXVlc3Rpb25hYmx5LnZvbHQubGl2ZSIsInN1YiI6Ik5KVmlsRCJ9.X0XAo6sopRAe528174Bccgvc1Mtx98-8e5_68-GrXSQ ). I press enter (on the address bar) and the link auto shortens itself to just " https://signon-prepares-questionably.volt.live/# ". (I take it this is normal and I have checked by re-pasting in the link etc).
  18. The exact same page comes up as in step 6.
  19. I assume it is now registered, so I click Sign In again and this time I proceed as though I am registered and I just sign in.
  20. From here it goes awry. It says “Account not confirmed. Would you like another confirmation email?”. With two options…
  21. As you would expect, “Send Again” does exactly the same thing all over again. If I click “No”, it just goes back to the sign in form saying “Account is unconfirmed”.
  22. (Of interest, I note that at this stage it doesn’t matter what password I set, it still says the same (step 20 on).

I did not save the sample (I have tried doing that, to a different file, in the past, then retried everything).

Did I miss something? :slight_smile:

more

Before step 8 (on another occasion), I also tried going back to the NSB IDE and inserting the value for Domain in project properties. I noted the value for AppID is auto-insterted.

After setting domain (in this case to “signon-confronts-triumphantly.volt.live”), I re-deployed it and followed the rest of the steps on the re-deployed version in case it needed that Domain info.

By the way, I also tried the same example under Java. Identical.


#9

Yes, that should work - if everything else is configured correctly.

I’ll work though your step by step and let you know what happens.


#10

Thanks! I modified my steps just now with no material changes except to make it easier to read for anyone else coming here. If it really should work, maybe that will help others!


#11

Step 4: you probably mean JavaScript. (you’re right, it’s not a problem)

Looking closely, the Confirm Page entry in the Dashboard is indeed the problem. I used /#/confirm/{{token}}.

Then, after I confirm the URL which comes in the email, I get:

Try signing onto https://signon-sees-well.volt.live and see if it works for you.


#12

Yep, that worked (on yours and on mine as well). I had tried that very early on but must have had something else wrong. Gratitude duly given!

But not to detract from you savouring your victory :slight_smile: (and my embarrassment), where does the word confirm come from in /#/confirm/{{token}} ? Ie: how is that defined in the app code? As Spock would say it is “illogical”…

Ie: http://wiki.nsbasic.com/User_confirmation says /confirm - specifically, the confirmation form. … but there is no such form. Yes, I’m a sore loser…


#13

Form1, function Main: line 11.


#14

That’s not a form name :smile: