feat(firebase-x): add getCurrentUser (#3389)

* feat(firebase-x): add getCurrentUser

add getCurrentUser method. fixes #3356

* Update index.ts

* resolve merge conflict

* resolve merge conflicts

Co-authored-by: Daniel Sogl <mytechde@outlook.com>
This commit is contained in:
Akshay Dwivedi 2020-05-15 18:04:15 +08:00 committed by GitHub
parent 9892ce7a61
commit 809e5ac14d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,48 @@ export interface IChannelOptions {
visibility?: -1 | 0 | 1;
}
export interface FirebaseUser {
/**
* ID token
*/
idToken?: string;
/**
* Provider ID
*/
providerId?: string;
/**
* UID
*/
uid?: string;
/**
* photo url
*/
photoUrl?: string;
/**
* phone number
*/
phoneNumber?: string;
/**
* is email verified
*/
emailIsVerified?: boolean;
/**
* email
*/
email?: string;
/**
* name
*/
name?: string;
}
/**
* @name Firebase X
* @description
@ -128,6 +170,15 @@ export class FirebaseX extends IonicNativePlugin {
return;
}
/**
* Get the current FCM user.
* @return {Promise<FirebaseUser | string>}
*/
@Cordova()
getCurrentUser(): Promise<FirebaseUser | string> {
return;
}
/**
* Get notified when a token is refreshed.
* @return {Observable<any>}