Skip to content

Commit

Permalink
fix(authentication): accessToken was returned as idToken (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz authored Apr 2, 2022
1 parent 5c0f381 commit 243011c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-planets-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@capacitor-firebase/authentication": patch
---

fix: `accessToken` was returned as `idToken`
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void handleSuccessCallback(LoginResult loginResult) {
AccessToken accessToken = loginResult.getAccessToken();
String accessTokenString = accessToken.getToken();
AuthCredential credential = FacebookAuthProvider.getCredential(accessTokenString);
pluginImplementation.handleSuccessfulSignIn(savedCall, credential, accessTokenString, null, accessTokenString);
pluginImplementation.handleSuccessfulSignIn(savedCall, credential, null, null, accessTokenString);
}

private void handleCancelCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FacebookAuthProviderHandler: NSObject {

let accessTokenString = accessToken.tokenString
let credential = FacebookAuthProvider.credential(withAccessToken: accessTokenString)
self.pluginImplementation.handleSuccessfulSignIn(credential: credential, idToken: accessTokenString, nonce: nil, accessToken: accessTokenString)
self.pluginImplementation.handleSuccessfulSignIn(credential: credential, idToken: nil, nonce: nil, accessToken: accessTokenString)
}
}
#endif
Expand Down

0 comments on commit 243011c

Please sign in to comment.