{"id":13736534,"url":"https://github.com/christianacca/static-web-apps-auth","last_synced_at":"2025-12-25T08:36:08.335Z","repository":{"id":45380938,"uuid":"397538712","full_name":"christianacca/static-web-apps-auth","owner":"christianacca","description":"Azure static web apps auth library","archived":false,"fork":false,"pushed_at":"2021-12-17T12:59:05.000Z","size":4273,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-30T04:44:51.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christianacca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-18T09:08:16.000Z","updated_at":"2023-12-13T18:52:19.000Z","dependencies_parsed_at":"2022-07-19T15:04:31.052Z","dependency_job_id":null,"html_url":"https://github.com/christianacca/static-web-apps-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianacca%2Fstatic-web-apps-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianacca%2Fstatic-web-apps-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianacca%2Fstatic-web-apps-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianacca%2Fstatic-web-apps-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christianacca","download_url":"https://codeload.github.com/christianacca/static-web-apps-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224732129,"owners_count":17360416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:23.589Z","updated_at":"2025-12-25T08:36:08.270Z","avatar_url":"https://github.com/christianacca.png","language":"TypeScript","funding_links":[],"categories":["Tools"],"sub_categories":["Auth"],"readme":"# Static Web Apps Authentication\n\n## Overview\n\nThis repo is the home to the npm package [@christianacca/angular-swa-auth](https://www.npmjs.com/package/@christianacca/angular-swa-auth)\n\nThe repo includes the following projects:\n\n* the [library](libs/angular-swa-auth/README.md) itself\n* a [demo app](apps/angular-swa-auth-demo) for the library\n* another [simple demo app](apps/angular-swa-auth-nolib) that does NOT require the \u003ccode\u003eangular-swa-auth\u003c/code\u003e helper library to implement authentication\n\nThe demo apps and documentation sites are available here:\n\n* library documentation: \n  - [reference](https://docs.angular-swa-auth.codingdemo.co.uk)\n  - [storybook examples](https://stories.angular-swa-auth.codingdemo.co.uk)\n* [library demo app](https://angular-swa-auth.codingdemo.co.uk)\n* [alternative \"no-library\" demo app](https://angular-swa-auth-nolib.codingdemo.co.uk)\n\n\n## Run demo app locally\n\n1. Install [nodejs](https://nodejs.org/en/) (LTS version)\n2. Clone the source code: `git clone https://github.com/christianacca/static-web-apps-auth`\n3. Trust the dev HTTPS certificate (see note below on security caveats):\n  - windows: double click batch file ./tools/dev-scripts/trust-cert.bat and accept any prompts\n  - mac/linux: From powershell, run ./tools/dev-scripts/trust-cert.ps1\n4. Install dependencies: `npm install`\n5. `npm start` then browse to \u003chttps://localhost:4820/\u003e\n\n### Security caveats when trusting the dev cert\n\nThis demo tries to play nicely with best practice of always using TLS even for local development.\nTo make this as frictionless as possible, this repo contains a [self-signed cert](tools/certs) which needs to be trusted for the browser\nto accept the content of the demo site served over https for localhost. Yay for convenience!\n\nHowever, this might pose a security risk (?). If you are concerned with this, then the advice is to re-generate the certificate\nusing the following script BEFORE trusting the cert: [generate-dev-certificate.md](docs/generate-dev-certificate.md).\n\nThis regenerated cert will only be local to your machine as it will not be committed back to this git repo.\n\n## Deploy\n\nThe demo apps and library document site are deployed to Azure static web apps:\n\n* [library reference documentation](https://portal.azure.com/#@christiancrowhurstgmail.onmicrosoft.com/resource/subscriptions/44835aa1-a779-412a-8225-7422ff9a4f33/resourceGroups/angular-swa-auth-docs/providers/Microsoft.Web/staticSites/angular-swa-auth-docs/staticsite)\n* [library storybook documentation](https://portal.azure.com/#@christiancrowhurstgmail.onmicrosoft.com/resource/subscriptions/44835aa1-a779-412a-8225-7422ff9a4f33/resourcegroups/angular-swa-auth-stories/providers/Microsoft.Web/staticSites/angular-swa-auth-stories/staticsite)\n* [library demo app](https://portal.azure.com/#@christiancrowhurstgmail.onmicrosoft.com/resource/subscriptions/44835aa1-a779-412a-8225-7422ff9a4f33/resourceGroups/angular-swa-auth-demo/providers/Microsoft.Web/staticSites/angular-swa-auth-demo/staticsite)\n* [alternative \"no-library\" demo app](https://portal.azure.com/#@christiancrowhurstgmail.onmicrosoft.com/resource/subscriptions/44835aa1-a779-412a-8225-7422ff9a4f33/resourceGroups/angular-swa-auth-nolib/providers/Microsoft.Web/staticSites/angular-swa-auth-nolib/staticsite)\n\nOn every PR:\n\n* Documentation and demo app sites will be deployed to a pre-prod staging environment \n  * note: github bot will add a comment to the PR with the url to the new staging environment\n* Dry run publish of the library package to npm\n\nOn push to master:\n\n* Documentation and demo app sites will be deployed to an prod environment\n* Publish of the library package to npm where the version in [package.json](libs/angular-swa-auth/package.json) is different to the versions already published to npm\n\n## Contributing\n\n[CONTRIBUTING.md](docs/CONTRIBUTING.md): developer guide if you intend to make changes in this repo\n\n## Other guides\n\n* Create your own library repo: [create-initial-repo](docs/create-initial-repo.md)\n* Generating a new dev HTTPS certificate: [generate-dev-certificate.md](docs/generate-dev-certificate.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianacca%2Fstatic-web-apps-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristianacca%2Fstatic-web-apps-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianacca%2Fstatic-web-apps-auth/lists"}