@inclouded/fhir-auth
v2.0.0
Published
``` npm install --save @inclouded/fhir-auth ```
Downloads
14
Keywords
Readme
FHIR Auth Firestore SDK
npm install --save @inclouded/fhir-auth
Introduction
In the repository the Firebase Cloud Firestore SDK can be found that was made for the FHIR Auth resource in an installable Angular folder form. The SDK can be installed for every Angular 2+ project. The SDK accomplishes the necessary CRUD operations.
Usage
For using the SDK an Angular 2+ project is needed, in which we can establish a connection to a Firestore database instance. (configured in environments.ts)
The SDK can be used in a Service in the following way:
import { Injectable } from '@angular/core';
import { FhirAuthApi } from '@inclouded/fhir-auth';
import { AngularFireAuth } from '@angular/fire/auth';
@Injectable()
export class FHIRAuthService {
FhirAuthApi: FhirAuthApi;
constructor(private afs: AngularFireAuth) {
this.FhirAuthApi = new FhirAuthApi(this.afs);
}
createUserWithEmailAndPassword(email: string, password: string) {
return this.FhirAuthApi.createUserWithEmailAndPassword(email, password);
}
signInWithEmailAndPassword(email: string, password: string) {
return this.FhirAuthApi.signInWithEmailAndPassword(email, password);
}
signOut() {
return this.FhirAuthApi.signOut();
}
}
Developer: Zoltán R. Jánki ([email protected]), Gábor Simon ([email protected])