Skip to content

Instantly share code, notes, and snippets.

@cdennig

cdennig/main.ts

Created Sep 6, 2017
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