forked from compnerd/swift-firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements one of the missing methods - `User.reauthenticate()` in the `swift-firebase` API. The implementation is pretty standard wrapper. Additionally `EmailAuthProvider`, `Credential`, `AuthResult` as very basic typealiases, so that they can be passed around in the reauthentication calls we want to do in Arc. On top of that `EmailAuthProvider.credential` is provided to build the `Credential` in a way that is compatible with macos swift version of this library.
- Loading branch information
Showing
2 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
@_exported | ||
import firebase | ||
@_spi(FirebaseInternal) | ||
import FirebaseCore | ||
|
||
import CxxShim | ||
import Foundation | ||
|
||
public typealias EmailAuthProvider = firebase.auth.EmailAuthProvider | ||
public typealias Credential = firebase.auth.Credential | ||
|
||
extension EmailAuthProvider { | ||
static func credential(withEmail email: String, password: String) -> Credential { | ||
GetCredential(email, password) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters