Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 33 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
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 |