diff options
Diffstat (limited to 'example/public/srp.js')
-rw-r--r-- | example/public/srp.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/example/public/srp.js b/example/public/srp.js index 51aba5c..4a4b9ee 100644 --- a/example/public/srp.js +++ b/example/public/srp.js @@ -5,15 +5,22 @@ $(document).ready(function(){ function on_login(event) { srp = new SRP(); + srp.success= on_authenticated; srp.identify(); event.preventDefault(); } function on_signup(event) { srp = new SRP(); - srp.success = function() { - alert("Signed up successfully"); - }; + srp.registered_user = on_registered; srp.register(); event.preventDefault(); } + +function on_registered() { + window.location = '/'; +} + +function on_authenticated() { + window.location = '/'; +} |