This is the sample project for the Auth0 blog post Create Your First Custom Schematic with Nx.
This project was generated with Angular CLI using Nrwl Nx. Both the Angular CLI and Nx are version 7+.
Watch a 5-minute video on how to get started with Nx.
Run ng generate app myapp
to generate an application. When using Nx, you can create multiple applications and libraries in the same CLI workspace. Read more here.
Run ng serve --project=myapp
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name --project=myapp
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build --project=myapp
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
We recommend using Auth0 to manage authentication for this project.
You'll first need to sign up for an Auth0 account. You can sign up for a free Auth0 account here.
Once you've got your account, you can set up an application to use with this project. We'll set up a Single Page Application (SPA) in Auth0 in these steps.
Here's how to set that up:
http://localhost:4200/callback
to the Allowed Callback URLs. (We're using localhost:4200
since it's the default port for the Angular CLI serve
command.)http://localhost:4200
to the Allowed Logout URLs.Note: Under the OAuth tab of Advanced Settings (at the bottom of the Settings section) you should see that the JsonWebToken Signature Algorithm is set to
RS256
. This is the default for new applications. If it is set toHS256
, please change it toRS256
. You can read more about RS256 vs. HS256 JWT signing algorithms here.
Auth0 helps you to:
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.