1.0.1 • Published 4 years ago

cs-jwt-login v1.0.1

Weekly downloads
6
License
-
Repository
-
Last release
4 years ago

How to use:

step1: install the package

step2: import it in your module ex: import { CsJwtLoginModule } from 'cs-jwt-login';

step3: In import section add his: CsJwtLoginModule.forRoot({ loginApi: 'http://localhost:8081/user/login', loginPath: 'login' }), where loginApi is the API ednpoint to check the login and the loginPath is the route path for the login page

step4: in your html file use the selector:

ste 6: In your app routing import the following guard import { AuthGuard } from 'cs-jwt-login';

step 7: Use the canActivate to restrict access canActivate: AuthGuard

step 8: DONE

1.0.1

4 years ago

1.0.0

4 years ago