This repo is the home to the npm package @christianacca/angular-swa-auth
The repo includes the following projects:
- the library itself
- a demo app for the library
- another simple demo app that does NOT require the
angular-swa-auth
helper library to implement authentication
The demo apps and documentation sites are available here:
- library documentation:
- library demo app
- alternative "no-library" demo app
- Install nodejs (LTS version)
- Clone the source code:
git clone https://github.com/christianacca/static-web-apps-auth
- Trust the dev HTTPS certificate (see note below on security caveats):
- windows: double click batch file ./tools/dev-scripts/trust-cert.bat and accept any prompts
- mac/linux: From powershell, run ./tools/dev-scripts/trust-cert.ps1
- Install dependencies:
npm install
npm start
then browse to https://localhost:4820/
This demo tries to play nicely with best practice of always using TLS even for local development. To make this as frictionless as possible, this repo contains a self-signed cert which needs to be trusted for the browser to accept the content of the demo site served over https for localhost. Yay for convenience!
However, this might pose a security risk (?). If you are concerned with this, then the advice is to re-generate the certificate using the following script BEFORE trusting the cert: generate-dev-certificate.md.
This regenerated cert will only be local to your machine as it will not be committed back to this git repo.
The demo apps and library document site are deployed to Azure static web apps:
- library reference documentation
- library storybook documentation
- library demo app
- alternative "no-library" demo app
On every PR:
- Documentation and demo app sites will be deployed to a pre-prod staging environment
- note: github bot will add a comment to the PR with the url to the new staging environment
- Dry run publish of the library package to npm
On push to master:
- Documentation and demo app sites will be deployed to an prod environment
- Publish of the library package to npm where the version in package.json is different to the versions already published to npm
CONTRIBUTING.md: developer guide if you intend to make changes in this repo
- Create your own library repo: create-initial-repo
- Generating a new dev HTTPS certificate: generate-dev-certificate.md