
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cidaas-angular-sdk
Advanced tools
## Table of Contents - [Overview](#overview) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Configuration](#configuration) - [Usage](#usage) - [Authentication](#authentication) - [Checking if user is authenticated Information](#c
The cidaas-angular-sdk is a comprehensive software development kit that facilitates seamless integration of cidaas authentication and authorization services into your Angular applications. It provides a set of tools and interfaces to implement secure user authentication, manage tokens, and access user information with ease.
Before you begin, ensure you have met the following requirements:
To install the cidaas-angular-sdk, run the following command in your project directory:
npm install cidaas-angular-sdk
Import the WebAuthModule in your app.module.ts:
import { WebAuthModule } from 'cidaas-angular-sdk';
@NgModule({
imports: [
// ... other imports
WebAuthModule.forRoot({
client_id: 'YOUR_CLIENT_ID',
redirect_uri: 'YOUR_REDIRECT_URI',
authority: 'YOUR_CIDAAS_BASE_URL',
skipRedirectCheck: false,
post_logout_redirect_uri: 'YOUR_POST_LOGOUT_REDIRECT_URI'
}),
],
// ... rest of your NgModule configuration
})
export class AppModule { }
Replace YOUR_CLIENT_ID, YOUR_REDIRECT_URI, YOUR_CIDAAS_BASE_URL and YOUR_POST_LOGOUT_REDIRECT_URI with your actual cidaas configuration.
To authenticate a user:
import { WebAuthService } from 'cidaas-angular-sdk';
class ProfileComponent {
constructor(
public authService: WebAuthService
) {
}
login() {
this.authService.loginWithBrowser() // Login with browser
}
}
After successful authentication:
this.authService.isAuthenticated$.subscribe(
authenticated => {
console.log('Authenticated:', authenticated); //boolean
},
error => {
console.error('Error fetching user info:', error);
}
);
Allow routes to be accessed by only authenticated users.
import { authGuardFn } from 'cidaas-angular-sdk';
const routes: Routes = [
{
path: '<route>',
component: 'COMPONENT',
canActivate: [authGuardFn] // import authGuardFn
},
{
path: 'profile-lazy',
loadChildren: () => import('LAZY_MODULE_PATH')
.then(m => 'm.MODULE_NAME'),
canActivate: [authGuardFn] // import authGuardFn
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Replace <route>, COMPONENT with route, component of your choice.
If you need to extend the guard logic and compose it with other guard implementations
After successful authentication:
this.authService.user$.subscribe(
userInfo => {
console.log('User Info:', userInfo);
},
error => {
console.error('Error fetching user info:', error);
}
);
To log out the user:
this.authService.logout();
The main service for interacting with cidaas authentication.
loginWithBrowser(signInOptions?: SignInRedirectArgs): Observable<void>: Initiates the login processloginCallback(paramsToRemove?: string[]): Observable<User | null>: Handle logout callback, pass on options to remove the url arguments. Returns Observable<User | null>popupSignIn(options?: SignInPopupArgs): Observable<User>: Initiates the login process with popuppopupSignInCallback(url?: string): Observable<User> : Handle popupSignInCallback and returns Observablelogout(): Observable<void>: Initiates the logout processgetUserInfo(): Observable<User>: Retrieves the authenticated user's information as observablegetToken(): Observable<string | null>: Returns the current access token as observablelogout(options?: SignoutRedirectArgs, useDirect: boolean = false): Observable<void>: Logout the authenticated userFAQs
## Table of Contents - [Overview](#overview) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Configuration](#configuration) - [Usage](#usage) - [Authentication](#authentication) - [Checking if user is authenticated Information](#c
We found that cidaas-angular-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.