Gathering detailed insights and metrics for @yeiniel/ngrx-auth0
Gathering detailed insights and metrics for @yeiniel/ngrx-auth0
Gathering detailed insights and metrics for @yeiniel/ngrx-auth0
Gathering detailed insights and metrics for @yeiniel/ngrx-auth0
npm install @yeiniel/ngrx-auth0
Typescript
Module System
Node Version
NPM Version
67
Supply Chain
92.5
Quality
75.3
Maintenance
50
Vulnerability
97.3
License
TypeScript (88.49%)
JavaScript (9.5%)
HTML (1.77%)
SCSS (0.24%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,040
Last Day
1
Last Week
4
Last Month
24
Last Year
125
MIT License
2 Stars
79 Commits
2 Watchers
16 Branches
1 Contributors
Updated on Apr 08, 2023
Minified
Minified + Gzipped
Latest Version
0.2.0
Package Id
@yeiniel/ngrx-auth0@0.2.0
Unpacked Size
231.47 kB
Size
49.77 kB
File Count
68
NPM Version
6.14.4
Node Version
12.16.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-20%
4
Compared to previous week
Last Month
166.7%
24
Compared to previous month
Last Year
-51%
125
Compared to previous year
NgrxAuth0 is an Angular module that provides authentication using Auth0 and implements its interface in the form of an NgRx store feature.
The module can be installed using the following command:
1npm install @yeiniel/ngrx-auth0 --save
Once the module has been installed you can add it as a dependency of the app module as follows:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3import { StoreModule } from '@ngrx/store'; 4import { NgrxAuth0Module } from '@yeiniel/ngrx-auth0'; 5import { EffectsModule } from '@ngrx/effects'; 6 7 8@NgModule({ 9 declarations: [ 10 AppComponent 11 ], 12 imports: [ 13 BrowserModule, 14 15 StoreModule.forRoot({}, {}), 16 EffectsModule.forRoot(), 17 NgrxAuth0Module.forRoot({ 18 domain: 'xxxx.auth0.com', 19 client_id: 'yyyyyyyy', 20 redirect_uri: `${window.location.origin}`, 21 audience: 'zzzzzzzzzzz' 22 }) 23 ], 24 providers: [], 25 bootstrap: [...] 26}) 27export class AppModule { }
Once the application has been configured to use the module there are tree artifacts that can be used to interact with it:
The following code is an example of a component that implement the UI used to interact with the module features:
1import { Component } from '@angular/core'; 2import { Store } from '@ngrx/store'; 3import { loginAction, logoutAction, isLoggedInSelector, profileSelector } from '@yeiniel/ngrx-auth0'; 4import { Observable } from 'rxjs'; 5 6@Component({ 7 selector: 'app-root', 8 template: ` 9 <ng-container [ngSwitch]="isLoggedIn$ | async"> 10 <button id="loginBtn" *ngSwitchCase="false" (click)="onLoginClick()">login</button> 11 <button id="logoutBtn" *ngSwitchCase="true" (click)="onLogoutClick()">logout</button> 12 </ng-container> 13 14 {{ profile$ | async }} 15 ` 16}) 17export class AppComponent { 18 19 isLoggedIn$: Observable<boolean>; 20 21 profile$: Observable<any>; 22 23 constructor(protected store: Store) { 24 this.isLoggedIn$ = this.store.select(isLoggedInSelector); 25 this.profile$ = this.store.select(profileSelector); 26 } 27 28 onLoginClick() { 29 this.store.dispatch(loginAction()); 30 } 31 32 onLogoutClick() { 33 this.store.dispatch(logoutAction()); 34 } 35}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
97 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More