Integrating with AngularJS
Using @authaction/web-sdk
Section titled “Using @authaction/web-sdk”npm install @authaction/web-sdkimport { provideAuthAction } from "@authaction/web-sdk/angular";
bootstrapApplication(AppComponent, { providers: [ provideAuthAction({ domain: "myapp.eu.authaction.com", clientId: "your-client-id", redirectUri: "http://localhost:4200/", }), ],});import { AuthActionService } from '@authaction/web-sdk/angular';
@Component({ ... })export class AppComponent { constructor(public auth: AuthActionService) {}}<button (click)="auth.loginWithRedirect()">Login</button><span *ngIf="auth.isAuthenticated$ | async">{{ (auth.user$ | async)?.name }}</span>Full SDK reference: github.com/authaction/authaction-web-sdk