aboutsummaryrefslogtreecommitdiff
path: root/src/client/js/main.js
blob: 270474614ff72a52c5e94b31bf625d360d4f5791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var app = Elm.fullscreen(Elm.Main, {
  initialTime: new Date().getTime(),
  translations: document.getElementById('messages').innerHTML,
  config: document.getElementById('config').innerHTML,
  validateSignIn: ""
});

app.ports.askSignIn.subscribe(function() {
  navigator.id.watch({
    loggedInUser: null,
    onlogin: function(assertion) { app.ports.validateSignIn.send(assertion); },
    onlogout: function() {}
  });
  navigator.id.request();
});