Skip to main content

Angular SDK

Angular service and components for Glide Identity integration.

Coming Soon

Angular SDK documentation is being prepared. The SDK will support Angular 14+ with full TypeScript support.

Planned Features

  • Angular Service: Injectable service for dependency injection
  • RxJS Integration: Observable-based API for reactive programming
  • Angular Guards: Route guards for authentication protection
  • Interceptors: HTTP interceptors for automatic token management
  • Standalone Components: Support for Angular's new standalone components
  • Module Support: NgModule-based integration for existing applications

Installation (Coming Soon)

npm install glide-web-client-sdk
# or
yarn add glide-web-client-sdk

Planned Usage

import { Component } from '@angular/core';
import { GlidePhoneAuthService } from 'glide-web-client-sdk/angular';

@Component({
selector: 'app-phone-verify',
template: `
<button (click)="verifyPhone()" [disabled]="isLoading$ | async">
Verify Phone
</button>

<div *ngIf="error$ | async as error">
Error: {{ error.message }}
</div>

<div *ngIf="result$ | async as result">
<p *ngIf="result.verified">✅ Phone verified!</p>
</div>
`
})
export class PhoneVerifyComponent {
isLoading$ = this.phoneAuth.isLoading$;
error$ = this.phoneAuth.error$;
result$ = this.phoneAuth.result$;

constructor(private phoneAuth: GlidePhoneAuthService) {}

async verifyPhone() {
await this.phoneAuth.verifyPhoneNumber('+14155551234', {
consent_data: {
consent_text: 'I agree to verify my phone number',
policy_link: 'https://example.com/privacy',
policy_text: 'Privacy Policy'
}
});
}
}

Get Notified

Want to be notified when the Angular SDK is available?

  1. Star our GitHub repository: github.com/GlideIdentity
  2. Join our newsletter: Subscribe for updates
  3. Contact support: support@glideidentity.com

Alternative: Use JavaScript SDK

While waiting for the dedicated Angular SDK, you can use the vanilla JavaScript SDK in your Angular application:

import { Injectable } from '@angular/core';
import { PhoneAuthClient } from 'glide-web-client-sdk';
import { BehaviorSubject } from 'rxjs';

@Injectable({
providedIn: 'root'
})
export class PhoneAuthService {
private client: PhoneAuthClient;
private loadingSubject = new BehaviorSubject<boolean>(false);
private errorSubject = new BehaviorSubject<Error | null>(null);

isLoading$ = this.loadingSubject.asObservable();
error$ = this.errorSubject.asObservable();

constructor() {
this.client = new PhoneAuthClient({
endpoints: {
prepare: '/api/phone-auth/prepare',
process: '/api/phone-auth/process'
}
});
}

async verifyPhoneNumber(phoneNumber: string, options?: any) {
this.loadingSubject.next(true);
this.errorSubject.next(null);

try {
const result = await this.client.verifyPhoneNumberComplete(phoneNumber, options);
return result;
} catch (error) {
this.errorSubject.next(error);
throw error;
} finally {
this.loadingSubject.next(false);
}
}
}

Next Steps