Skip to content

Instantly share code, notes, and snippets.

@cdennig
Created September 6, 2017 20:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Aurelia main
aurelia
.start()
.then((a) => {
// get auth object from Aurelia container
let auth : Auth = a
.container
.get(Auth);
setTimeout(() => {
auth
.isAuthenticated()
.then(() => {
a.setRoot();
return;
})
.catch(() => {
auth.login();
});
}, 200);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment