Sentry is an Aurelia template that solves a few common authentication issues. It has a special login app shell for creating an authentication app that keeps your main app secure, and an authentication manager class for tracking the state of a logged in user across the application, from session to session.
Sentry is free. If you've successfully used it and it has saved you an hour of your life, consider leaving me a tip so I can continue building templates.
Running The App
To run the app, follow these steps.
- Ensure that NodeJS is installed. This provides the platform on which the build tooling runs.
- From the project folder, execute the following command:
- Ensure that Gulp is installed. If you need to install it, use the following command:
npm install -g gulp
- Ensure that jspm is installed. If you need to install it, use the following command:
npm install -g jspm
Note: jspm queries GitHub to install semver packages, but GitHub has a rate limit on anonymous API requests. It is advised that you configure jspm with your GitHub credentials in order to avoid problems. You can do this by executing
jspm registry config githuband following the prompts.
- Install the client-side dependencies with jspm:
jspm install -y
Note: Windows users, if you experience an error of "unknown command unzip" you can solve this problem by doing
npm install -g unzipand then re-running
- To run the app, execute the following command:
- Browse to http://localhost:9000 to see the app. You can make changes in the code found under
srcand the browser should auto-refresh itself as you save files.
Note: At present there is a bug in the HTMLImports polyfill which only occurs on IE. We have submitted a pull request to the team with the fix. In the mean time, if you want to test on IE, you can work around the issue by explicitly adding a script tag before you load system.js. The script tag should look something like this (be sure to confirm the version number):
To build the app, follow these steps.
- To make sure the files are all properly built, execute the following command:
- To run the bundler, execute the following command:
jspm bundle '*' + aurelia-binding + aurelia-bootstrapper + aurelia-dependency-injection + aurelia-event-aggregator + aurelia-fetch-client + aurelia-framework + aurelia-history + aurelia-history-browser + aurelia-http-client + aurelia-loader + aurelia-loader-default + aurelia-logging + aurelia-metadata + aurelia-path + aurelia-route-recognizer + aurelia-router + aurelia-task-queue + aurelia-templating + aurelia-templating-binding + aurelia-templating-resources + aurelia-templating-router + bootstrap + clean-css + core-js + css + fetch + font-awesome dist/app-bundle.js --inject --minify
Now, using any HTTP server that can serve static files, your app will be served as a bundle with a significant first-load speed improvement over your development environment.