src/modules/github/github-auth.ts   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 33
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 26
mnd 0
bc 0
fnc 2
dl 0
loc 33
rs 10
bpm 0
cpm 1
noi 0
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A GithubAuth.getBrowserSignInProvider 0 3 1
A GithubAuth.signInNative 0 3 1
1
import { Injectable } from "@angular/core";
2
import { AngularFireAuth } from "@angular/fire/auth";
3
import { Platform } from "@ionic/angular";
4
import { auth } from "firebase/app";
5
import { UniFirebaseLoginConfigProvider } from "../../config/uni-firebase-login-config-provider";
6
import { AbstractAuth } from "../../providers/abstract-auth";
7
import { IAuthProvider } from "../../providers/i-auth-provider";
8
import { IGithubAuthOptions } from "./i-github-auth-options";
9
10
@Injectable()
11
export class GithubAuth extends AbstractAuth implements IAuthProvider {
12
  public readonly providerKey = "github";
13
  public readonly defaultOptions: IGithubAuthOptions = {
14
    signInType: "popup",
15
  };
16
17
  public constructor(
18
    angularFireAuth: AngularFireAuth,
19
    platform: Platform,
20
    config: UniFirebaseLoginConfigProvider,
21
  ) {
22
    super(angularFireAuth, platform, config);
23
  }
24
25
  public async signInNative(options: any): Promise<auth.UserCredential | null> {
26
    throw new Error("Method not implemented!");
27
  }
28
29
  protected getBrowserSignInProvider() {
30
    return new auth.GithubAuthProvider();
31
  }
32
}
33