{"repo":"serhiisol/ngx-auth","free":true,"listed":false,"github":"https://github.com/serhiisol/ngx-auth","clone":"git clone https://github.com/serhiisol/ngx-auth.git","description":"Angular 20+ Authentication Module","language":"TypeScript","stars":237,"topics":["angular","authentication"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Angular 20+ Authentication This package provides authentication module with interceptor For older versions of angular see Older Versions section. Full example Full example you can find in the example folder. Authentication module Authentication modules provides ability to attach authentication token automatically to the headers (through http interceptors), refresh token functionality, guards for protected or public pages and more. Usage 1. Import NgxAuthService interface to implement it with your custom Authentication service, e.g.: 2. Specify functions ngxPublicGuard for public routes and ngxProtectedGuard for protected respectively, e.g.: 3. Use provideNgxAuthProviders to provide NgxAuthService implementation and protectedRedirectUri , publicRedirectUri redirect uris Customizing authentication headers By default, requests are intercepted and a { Authorization: 'Bearer ${token}'} header is injected. To customize this behavior, implement the getHeaders method on your NgxAuthService After login redirect to the interrupted URL The NgxAuthService has an optional method setInterruptedUrl which saves the URL that was requested before the user is redirected to the login page. This property can be used in order to redirect the user to the originally requested page after he logs in. Older Versions For angular 16-19, use version 6.0.0 For angular 7-15, use version 5.4.0 For angular 6, use version 4.1.0 For angular 5, use version 3.1.0 For angular 4, use version 2.2.0","default_branch":null,"files":null,"tree":[],"storefront":"/r/serhiisol","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/serhiisol/ngx-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}