Skip to content

Instantly share code, notes, and snippets.

@cdennig
Created September 6, 2017 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdennig/e6a398ea894ce39d4d40da1e9f4eb1b8 to your computer and use it in GitHub Desktop.
Save cdennig/e6a398ea894ce39d4d40da1e9f4eb1b8 to your computer and use it in GitHub Desktop.
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