Skip to content

Commit

Permalink
RxFirebase 0.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
engali94 committed May 13, 2020
1 parent 9c57ea7 commit 96ca29c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions Sources/Auth/FIRAuth+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extension Reactive where Base: Auth {
*/
public func fetchProviders(forEmail email: String) -> Observable<[String]> {
return Observable.create { observer in
self.base.fetchProviders(forEmail: email) { providers, error in
self.base.fetchSignInMethods(forEmail: email) { providers, error in
guard let error = error else {
observer.onNext(providers ?? [])
observer.onCompleted()
Expand All @@ -59,7 +59,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Fetches the list of all sign-in methods previously used for the provided email address.

@param email The email address for which to obtain a list of sign-in methods.
Expand Down Expand Up @@ -155,7 +155,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook
login Access Token, a Google ID Token/Access Token pair, etc.) and returns additional
identity provider data.
Expand Down Expand Up @@ -197,7 +197,7 @@ extension Reactive where Base: Auth {
*/
public func signInAndRetrieveData(with credential: AuthCredential) -> Observable<AuthDataResult> {
return Observable.create { observer in
self.base.signInAndRetrieveData(with: credential) { auth, error in
self.base.signIn(with: credential) { auth, error in
if let error = error {
observer.onError(error)
} else if let auth = auth {
Expand Down Expand Up @@ -270,7 +270,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Creates and, on success, signs in a user with the given email address and password.

@param email The user's email address.
Expand Down Expand Up @@ -339,7 +339,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Checks the validity of an out of band code.

@param code The out of band code to check validity.
Expand All @@ -360,7 +360,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Checks the validity of a verify password reset code.

@param code The password reset code to be verified.
Expand Down Expand Up @@ -405,7 +405,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Initiates a password reset for the given email address.

@param email The email address of the user.
Expand Down Expand Up @@ -531,7 +531,7 @@ extension Reactive where Base: Auth {
}
}

/**
/**
@brief Registers a block as an "ID token did change" listener. To be invoked when:

+ The block is registered as a listener,
Expand Down
6 changes: 3 additions & 3 deletions Sources/Auth/FIRUser+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ extension Reactive where Base: User {
*/
public func reauthenticateAndRetrieveData(with credential: AuthCredential) -> Observable<AuthDataResult> {
return Observable.create { observer in
self.base.reauthenticateAndRetrieveData(with: credential) { result, error in
self.base.reauthenticate(with: credential) { result, error in
if let error = error {
observer.onError(error)
} else if let result = result {
Expand Down Expand Up @@ -296,7 +296,7 @@ extension Reactive where Base: User {
}
}

/**
/**
@brief Associates a user account from a third-party identity provider with this user and
returns additional identity provider data.

Expand All @@ -322,7 +322,7 @@ extension Reactive where Base: User {
*/
public func linkAndRetrieveData(with credential: AuthCredential) -> Observable<AuthDataResult> {
return Observable.create { observer in
self.base.linkAndRetrieveData(with: credential) { result, error in
self.base.link(with: credential) { result, error in
if let error = error {
observer.onError(error)
} else if let result = result {
Expand Down
4 changes: 2 additions & 2 deletions Sources/RemoteConfig/RemoteConfig+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension Reactive where Base: RemoteConfig {
self.base.fetch { status, error in
guard let error = error else {
if activateFetched, status == .success {
self.base.activateFetched()
self.base.activate()
}
observer.onNext(status)
observer.onCompleted()
Expand All @@ -42,7 +42,7 @@ extension Reactive where Base: RemoteConfig {
self.base.fetch(withExpirationDuration: duration) { status, error in
guard let error = error else {
if activateFetched, status == .success {
self.base.activateFetched()
self.base.activate()
}
observer.onNext(status)
observer.onCompleted()
Expand Down

0 comments on commit 96ca29c

Please sign in to comment.