Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 27 lines (21 sloc) 0.651 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<head>
  <script src="webactivities.js" type="text/javascript"></script>

  <script type="text/javascript">

    // The login page can be AJAX or normal form submit,
    // with a full page reload. All that matters is that
    // the following navigator.apps.* call be made.

    function onSuccessfulLogin() {
      navigator.apps.services.storeCredential({
        credential: {id: 'john@smith.com'},
        displayName: "John Smith"
      });
    }
  </script>

</head>
<body>
<h2>Login</h2>

<p>
This page fakes a login. Replace it with your own login experience.
</p>

<button onclick="onSuccessfulLogin();">login as John Smith</button>
</body>
Something went wrong with that request. Please try again.