2.0.0 • Published 3 years ago

@inclouded/fhir-auth v2.0.0

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

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

  1. 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)

  2. 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 (jankiz@inf.u-szeged.hu), Gábor Simon (simonovszkij@gmail.com)