Skip to content

Use oauthAccessToken instead of IDToken when returnIDPCredential is yes #2541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Firebase/Auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# v5.4.1
- Deprecate Microsoft and Yahoo OAuth Provider ID (#2517)
- Fix an issue where an exception was thrown when linking OAuth credentials. (#2521)
- Fix an issue where a wrong error was thrown when upgrading anonymous user. (#2530)
- Fix an issue where a wrong error was thrown when upgrading anonymous user. (#2530, #2541)

# v5.4.0
- Add support of Generic IDP (#2405).
Expand Down
2 changes: 1 addition & 1 deletion Firebase/Auth/Source/FIRUser.m
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ - (void)linkAndRetrieveDataWithCredential:(FIRAuthCredential *)credential
// Update the new token and refresh user info again.
self->_tokenService = [[FIRSecureTokenService alloc]
initWithRequestConfiguration:requestConfiguration
accessToken:response.IDToken
accessToken:response.oauthAccessToken
accessTokenExpirationDate:response.approximateExpirationDate
refreshToken:response.refreshToken];
[self internalGetTokenWithCallback:^(NSString *_Nullable accessToken,
Expand Down