{"_id":"@bruno-bombonate/ngx-authentication","_rev":"9-4364a222edc5f6bbbbc6f7569f93e232","name":"@bruno-bombonate/ngx-authentication","dist-tags":{"latest":"22.0.0"},"versions":{"1.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"1.0.0","_id":"@bruno-bombonate/ngx-authentication@1.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"7211f2ed68c970454402fba21dfb2703d17b64f6","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-1.0.0.tgz","fileCount":12,"integrity":"sha512-JyER63vkMG+5rjwaYYsVxINTSCXinQHlGMw6UKercybf5MyDxPMWl98EjApl1EFgvJiLi67z2IGJeN9uixQlKQ==","signatures":[{"sig":"MEYCIQDdhVHkeO9AEY2JzwFrG+QAJAh96fjRSNQIa/3aapLzCgIhAMOnyG5WlXLk/biN8Scp0Uu10WudU+TDQxAhCsH075j6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQuokACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQLQ//VeDvWuNZYW3UQd6qFT3d0cOsUGQOWADLS0P72DW6qJRMmZ7R\r\nItUMrKntc2As0pL9q0ZTZsidTNed8CKi9EjiOBScBn8nsQg05EkA5hzUskbG\r\nC7CqUZ1bYu1gEFd65LkgkI9FpB8Rh+PP7DO+RIxdfCdiDG2b1DuEPJ25vw5W\r\nKXX+YDv6ZEu3Q3lvEy/6a4xnHr524e85Gw8HkBfaR8uxyA9anSCt6eUUvk7p\r\njldMqzFAKFAN6UiiSm9UjLCoc6tR9JwO/7sMIppIDB+mHo5eoNftnkIxxVoj\r\nOHCceYuL6SKo7Us93VK5C3Mt8TFzT5FuOY4uqQkMGKiRz+KccPYHfvAUVA6+\r\na0uuVv1GfSGDSJuKwAHQaA8RL5omZ06eHoPm6hDuMvFp+6eu9Ego5BmP7TJx\r\nHxj2oxEYMnaVGTzzHcCuwZkfpntOnmxuHLdJMfum63BzX3kuz+wXpUooWT4U\r\n5sB+MXWJc9PJkfMmLouhEarwk1fsDs/KlIKFfBaKipYJlQafTm+RTJZyXwI8\r\nLgM3fBiphiJ2ZYb2OHPyMQXyAoR2lLX/bBsH8gFM3qawt0Up+tdoCUB9i4Pz\r\neSzum45SzikmeXhzcJWJsKyPaXhd3x6PUgJ2gr0O1oB8zl3KxbdHXw4ub3uh\r\nSB3cgqHh34nwclIQktZXtnIdo1h0V7mDz8A=\r\n=SxM+\r\n-----END PGP SIGNATURE-----\r\n"},"es2020":"fesm2020/bruno-bombonate-ngx-authentication.mjs","module":"fesm2015/bruno-bombonate-ngx-authentication.mjs","esm2020":"esm2020/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"node":"./fesm2015/bruno-bombonate-ngx-authentication.mjs","types":"./index.d.ts","es2015":"./fesm2015/bruno-bombonate-ngx-authentication.mjs","es2020":"./fesm2020/bruno-bombonate-ngx-authentication.mjs","default":"./fesm2020/bruno-bombonate-ngx-authentication.mjs","esm2020":"./esm2020/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"988ac19cfc1031ab31d37c25a63270fa67922985","typings":"index.d.ts","_npmUser":{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"},"fesm2015":"fesm2015/bruno-bombonate-ngx-authentication.mjs","fesm2020":"fesm2020/bruno-bombonate-ngx-authentication.mjs","_npmVersion":"9.2.0","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"18.16.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^15.2.0","@angular/common":"^15.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_1.0.0_1682106916648_0.681307321964906","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"2.0.0","_id":"@bruno-bombonate/ngx-authentication@2.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"975180a73c38cbe316890aa4a122acb61f94e16f","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-2.0.0.tgz","fileCount":10,"integrity":"sha512-lPmSAU/EdiW5eIepnMfdT9SEwE+g8YyRH9SFBqOfpNUlUeM8OIAdIfEoQ6kWZ3EbbxprQL0uRP/J/ZeP3dePJA==","signatures":[{"sig":"MEUCIBAmUoVTp+iDtKjH+ZLFWs49PK3bwN+OSHB7ZH+TRM94AiEA2Y3i/xE2hnhYQvg+tk0jJChiCyxLKOHcjH7Comvxg1Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19591},"module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"esm":"./esm2022/bruno-bombonate-ngx-authentication.mjs","types":"./index.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs","esm2022":"./esm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"d1622812228f739bc7fa66fe00dde08eb47251ea","typings":"index.d.ts","_npmUser":{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"},"_npmVersion":"9.2.0","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"18.16.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^16.0.3","@angular/common":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_2.0.0_1685385036390_0.4175088257686821","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"3.0.0","_id":"@bruno-bombonate/ngx-authentication@3.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"46cce89f6722d953c7fe356b3842255d5b67df56","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-3.0.0.tgz","fileCount":10,"integrity":"sha512-U50NBbsfwbSAcs2fS356h0KXc8vvpan54zBWcg7G343wZ7f/4U+9dKtSPOshRnGrv8RYeSlr7zpGNZC6I7GAkw==","signatures":[{"sig":"MEYCIQDT4vPLlC/YWsH6XjX++XcAyvciLTqrEBxx9B5s8suyagIhAIpXpBRPEDC9H+uR3Y2T5nXAR4xHkPLUlmkldDf+a4zC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19430},"module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"esm":"./esm2022/bruno-bombonate-ngx-authentication.mjs","types":"./index.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs","esm2022":"./esm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"2124989473666fc16984df3d2773b7b43daa9683","typings":"index.d.ts","_npmUser":{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"},"_npmVersion":"9.2.0","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"18.16.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^17.0.0","@angular/common":"^17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_3.0.0_1701119824246_0.40263605163137384","host":"s3://npm-registry-packages"}},"18.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"18.0.0","_id":"@bruno-bombonate/ngx-authentication@18.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"d2c2807427f147f11493426fe3a023db17c4ddf6","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-18.0.0.tgz","fileCount":10,"integrity":"sha512-DWopJgLS6GgCIMLa7zZLzFDLmI9G57IoZkQGY+q9m9+ulbpbET/Q4wEBQ/3Fog5F9Wi6KJdDOnvRXbaTDTleoQ==","signatures":[{"sig":"MEYCIQDQlZHmU/MRIhSJrSilgey1NFVugpsqd2rTWIuRzubR3wIhAKoY/ilgPRs8/8KcnJafFueXymPjGZJVCsQkeEc/O2PO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18917},"module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"esm":"./esm2022/bruno-bombonate-ngx-authentication.mjs","types":"./index.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs","esm2022":"./esm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"d3dc6640c7d657fc7a9936ef334e56cd6a295519","typings":"index.d.ts","_npmUser":{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"},"_npmVersion":"11.0.0","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"20.18.1","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^18.0.0","@angular/common":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_18.0.0_1737357420319_0.8382724944477697","host":"s3://npm-registry-packages-npm-production"}},"19.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"19.0.0","_id":"@bruno-bombonate/ngx-authentication@19.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"ad538142b89fc89d6ba224fe5084bef05607441b","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-19.0.0.tgz","fileCount":7,"integrity":"sha512-O/oBMy8OH2ztAxkLLo8lzYyZQAqGUk3MSwlpwvjv7Mn2Q/L0kbzf9FShRkAW7IS33BEX19xh5QBhI/+QymC4pA==","signatures":[{"sig":"MEYCIQCR4xkxb8TYOf24pwrMFwaaxjd/76dF+mC6qHm0TrhqTAIhAM4QgyRi2i0D+qSQgGjDdCXwCwPYT3fIHmeWJqbbEen2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9946},"module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"7f32d0b69f58eda2e8ab6487251b0faa70768d2e","typings":"index.d.ts","_npmUser":{"name":"bruno-bombonate","actor":{"name":"bruno-bombonate","type":"user","email":"bruno.siecola@outlook.com"},"email":"bruno.siecola@outlook.com"},"_npmVersion":"10.9.2","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"22.15.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^19.0.0","@angular/common":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_19.0.0_1750756642497_0.48659119419000874","host":"s3://npm-registry-packages-npm-production"}},"20.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"20.0.0","_id":"@bruno-bombonate/ngx-authentication@20.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"82f66b4d9cdac70d28178204f144151e561feebd","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-20.0.0.tgz","fileCount":5,"integrity":"sha512-pp97Y1kPIh1q6xHxgvko0p3domTMEE1Ja+CqHCldk/InmhtD6FsXe6ojPpw+JKWrwpzDMOrv6/QSp1f0wJk0yA==","signatures":[{"sig":"MEYCIQCduasVvXPXdJfotitk4317JomIQLQGYeAZLuW7SFNAnAIhANuPJ6lAPfxU9EBnTybLOnBQ7hZEQOShbHa/1p265/ak","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9862},"module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"types":"./index.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"dd7cad3d5a03609a7115daaa284080aa1560cb6a","typings":"index.d.ts","_npmUser":{"name":"bruno-bombonate","actor":{"name":"bruno-bombonate","type":"user","email":"bruno.siecola@outlook.com"},"email":"bruno.siecola@outlook.com"},"_npmVersion":"10.9.2","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"22.16.0","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^20.0.0","@angular/common":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_20.0.0_1751141243420_0.037175446099321","host":"s3://npm-registry-packages-npm-production"}},"21.0.0":{"name":"@bruno-bombonate/ngx-authentication","version":"21.0.0","_id":"@bruno-bombonate/ngx-authentication@21.0.0","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"dist":{"shasum":"a6af1ee530598aae42595683053d1343956388ca","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-21.0.0.tgz","fileCount":5,"integrity":"sha512-oGj5OS6FVKgbUnEfmkZV/PFC/d8WpA7I0gty6+HcKdQWjK+jG2oWC9Gs95yLHYapuZTpaKXz4I3gie+LSW0rGw==","signatures":[{"sig":"MEQCIBqWNV2M9rDLdNZlrllkLR+1quT0lRD5Ym5ypeYBz3WEAiB4T8T6kbT08l0DjN4X95DiHgnMwyDDJXarWSI1GVa5og==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCID+EkhNimVS20EWsLulwTa3JV3Z221U3779TDPb/cBHxAiAGEbc+7izxs9wW90FMdFG/EH9NMYalhHOEkYUqqUpedQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11835},"type":"module","module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"types":"./types/bruno-bombonate-ngx-authentication.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"d5fced5157ef89faf702f9476d8bab6554627492","typings":"types/bruno-bombonate-ngx-authentication.d.ts","_npmUser":{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"},"_npmVersion":"12.0.2","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.1","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^21.0.0","@angular/common":"^21.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ngx-authentication_21.0.0_1789666651359_0.31607382761359504","host":"s3://npm-registry-packages-npm-production"}},"22.0.0":{"_id":"@bruno-bombonate/ngx-authentication@22.0.0","dist":{"shasum":"fb6f547bded5532bb14081321c0f87abf08822c3","tarball":"https://registry.npmjs.org/@bruno-bombonate/ngx-authentication/-/ngx-authentication-22.0.0.tgz","fileCount":5,"integrity":"sha512-X3XgRPfi2UM9qeDVEetSzVQW1FhQOv1/8HYqYTov2NheXo40Pz2GkFI1MpBrromSNvLGFCD1lEuGI6IdC+qVxQ==","signatures":[{"sig":"MEUCIQDwgmHwctITB90RDrddlrjzBPljIgX/INkjglF1SBhylgIgX/D6Xw3sRpunkCAv2xDN2oqeDd3mvIvhiJjX0odwylk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIATAo7BAOfw2QijA35LQjca04XTHIs1llUWthdpcDsmXAiEAzNA+hpvShBJQBpKDO3+FA2Fb7Zj+9EMCko2+JbqGlss="}],"unpackedSize":11595},"name":"@bruno-bombonate/ngx-authentication","type":"module","module":"fesm2022/bruno-bombonate-ngx-authentication.mjs","exports":{".":{"types":"./types/bruno-bombonate-ngx-authentication.d.ts","default":"./fesm2022/bruno-bombonate-ngx-authentication.mjs"},"./package.json":{"default":"./package.json"}},"gitHead":"03210be70cc955f338fa5bf8001697cef4b710f1","typings":"types/bruno-bombonate-ngx-authentication.d.ts","version":"22.0.0","_npmUser":{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"},"_npmVersion":"12.0.2","description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","directories":{},"maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"sideEffects":false,"_nodeVersion":"24.18.1","dependencies":{"tslib":"^2.3.0"},"_hasShrinkwrap":false,"peerDependencies":{"@angular/core":"^22.0.0","@angular/common":"^22.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ngx-authentication_22.0.0_1789725094667_0.6455372174082457"}}},"time":{"created":"2023-04-21T19:55:16.647Z","modified":"2026-09-18T09:51:34.923Z","1.0.0":"2023-04-21T19:55:16.830Z","2.0.0":"2023-05-29T18:30:36.709Z","3.0.0":"2023-11-27T21:17:04.431Z","18.0.0":"2025-01-20T07:17:00.498Z","19.0.0":"2025-06-24T09:17:22.659Z","20.0.0":"2025-06-28T20:07:23.580Z","21.0.0":"2026-09-17T17:37:31.450Z","22.0.0":"2026-09-18T09:51:34.760Z"},"description":"A package with AuthenticationService, that you can set, get and unset authentication in Angular apps.","maintainers":[{"name":"bruno-bombonate","email":"bruno.siecola@outlook.com"}],"readme":"\n# @bruno-bombonate/ngx-authentication\n\nA package with AuthenticationService, that you can set, get and unset authentication in Angular apps.\n\n## Installation\n\n```bash\nnpm install @bruno-bombonate/ngx-authentication\n```\n\n### Compatibility table\n\n|@bruno-bombonate/ngx-authentication|Angular|\n|-|-|\n|1.0.0|15.x|\n|2.0.0|16.x|\n|3.0.0|17.x|\n|18.0.0|18.x|\n|19.0.0|19.x|\n|20.0.0|20.x|\n|21.0.0|21.x|\n|22.0.0|22.x|\n\nWorks with any Angular 22 version (`^22.0.0`), not just the exact minor/patch used to build this package.\n\n## Usage\n\n`AuthenticationService` has four methods:\n\n- `setAuthentication<T>(authentication: T, rememberMe: boolean): void` — stores `authentication` as JSON, in `localStorage` when `rememberMe` is `true`, in `sessionStorage` otherwise (so it's cleared when the browser tab closes).\n- `getAuthentication<T>(): T | null` — reads back whatever was stored (checking `localStorage` first, then `sessionStorage`), parsed from JSON. Type it with the same shape you passed to `setAuthentication` (for example `getAuthentication<{ token: string }>()`). Returns `null` if nothing is stored, or when called on the server (SSR-safe: every method is a no-op outside the browser).\n- `isLoggedIn(): boolean` — `true` if there's anything stored in either `localStorage` or `sessionStorage`, without parsing it. Cheaper than `getAuthentication() !== null` when you only need a yes/no answer (e.g. inside a route guard).\n- `unsetAuthentication(): void` — removes the stored value from both `localStorage` and `sessionStorage`.\n\n### sign-in.component.ts\n\n```typescript\nimport { Component, inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { AuthenticationService } from '@bruno-bombonate/ngx-authentication';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n  selector: 'app-sign-in',\n  templateUrl: './sign-in.component.html',\n  styleUrls: ['./sign-in.component.sass']\n})\nexport class SignInComponent {\n\n  private readonly httpClient = inject(HttpClient);\n  private readonly authenticationService = inject(AuthenticationService);\n\n  public readonly formLoading = signal<boolean>(false);\n\n  public handleFormSubmit(value: any): void {\n    if (this.formLoading() === false) {\n      this.formLoading.set(true);\n      this.httpClient.post('users/sign-in')\n        .subscribe({\n          next: (response: any) => {\n            this.authenticationService.setAuthentication(response.data, value.rememberMe);\n            this.formLoading.set(false);\n          },\n          error: (response: any) => {\n            this.formLoading.set(false);\n          }\n        });\n    }\n  }\n\n}\n```\n\n### my-account.component.ts\n\n```typescript\nimport { Component } from '@angular/core';\nimport { AuthenticationService } from '@bruno-bombonate/ngx-authentication';\n\n@Component({\n  selector: 'app-my-account',\n  templateUrl: './my-account.component.html',\n  styleUrls: ['./my-account.component.sass']\n})\nexport class MyAccountComponent {\n\n  private readonly authenticationService = inject(AuthenticationService);\n\n  public signOut(): void {\n    this.authenticationService.unsetAuthentication();\n  }\n\n}\n```\n\n### application.guard.ts\n\n```typescript\nimport { CanActivateFn, Router } from '@angular/router';\nimport { inject } from '@angular/core';\nimport { AuthenticationService } from '@bruno-bombonate/ngx-authentication';\n\nexport const applicationGuard: CanActivateFn = () => {\n\n  const authenticationService = inject(AuthenticationService);\n  const router = inject(Router);\n\n  if (authenticationService.isLoggedIn() === true) {\n    return true;\n  }\n\n  return router.createUrlTree(['/sign-in']);\n\n};\n```\n\n`getAuthentication()` returns whatever object you originally passed to `setAuthentication` (for example `{ token: '...', user: { ... } }`), so you can read it wherever you need the stored token or user without making a network call:\n\n```typescript\ninterface Authentication {\n  token: string;\n}\n\nconst authentication = authenticationService.getAuthentication<Authentication>();\nconst token = authentication?.token;\n```\n","readmeFilename":"README.md"}