I'm trying to setup a password reset within an app using swift 2 and Firebase.
Following Firebases example:
let ref = Firebase(url: "https://<YOUR-FIREBASE-APP>.firebaseio.com") ref.changePasswordForUser("[email protected]", fromOld: "correcthorsebatterystaple", toNew: "batteryhorsestaplecorrect", withCompletionBlock: { error in if error != nil { // There was an error processing the request } else { // Password changed successfully } }) How can I access an authenticated users email & password in order to pass those values to this function instead of the current mock data?
I'm not interested in sending a temporary password in a pass reset email.
I was thinking that I'd be able to access these values by something like:
let ref = Firebase(url: firebaseURL) ref.authData.providerData.someValueHere But I haven't been able to figure it out.
How can I access these values from the currently authenticated user?