Skip to content

Commit

Permalink
fix(authentication): provide access token for Twitter (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz authored Jun 11, 2022
1 parent dcbf4f1 commit 5da5fbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-falcons-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@capacitor-firebase/authentication": patch
---

fix(ios): provide access token for Twitter
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public typealias AuthStateChangedObserver = () -> Void
savedCall.resolve(result)
return
}
Auth.auth().signIn(with: credential) { (_, error) in
Auth.auth().signIn(with: credential) { (authResult, error) in
if let error = error {
self.handleFailedSignIn(message: nil, error: error)
return
Expand All @@ -241,7 +241,7 @@ public typealias AuthStateChangedObserver = () -> Void
return
}
let user = self.getCurrentUser()
let result = FirebaseAuthenticationHelper.createSignInResult(credential: credential, user: user, idToken: idToken, nonce: nonce, accessToken: accessToken)
let result = FirebaseAuthenticationHelper.createSignInResult(credential: authResult?.credential, user: user, idToken: idToken, nonce: nonce, accessToken: accessToken)
savedCall.resolve(result)
}
}
Expand Down

0 comments on commit 5da5fbf

Please sign in to comment.