Skip to content

[firebase_auth] on ios not using getTokenId refresh bool #847

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
kroikie opened this issue Oct 13, 2019 · 5 comments
Closed

[firebase_auth] on ios not using getTokenId refresh bool #847

kroikie opened this issue Oct 13, 2019 · 5 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. type: bug Something isn't working

Comments

@kroikie
Copy link
Collaborator

kroikie commented Oct 13, 2019

Refresh bool is hard coded to YES for ios. Android uses the bool as expected.

https://github.com/flutter/plugins/blob/master/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m

  } else if ([@"getIdToken" isEqualToString:call.method]) {
    [[FIRAuth auth].currentUser
        getIDTokenForcingRefresh:YES
                      completion:^(NSString *_Nullable token, NSError *_Nullable error) {
                        result(error != nil ? error.flutterError : token);
                      }];
@kroikie
Copy link
Collaborator Author

kroikie commented Oct 13, 2019

@bjon

The issue at flutter/flutter#16807 has been closed and moved here. Future collaboration on this issue will be done here.

@iapicca iapicca changed the title firebase_auth on ios not using getTokenId refresh bool [firebase_auth] on ios not using getTokenId refresh bool Oct 23, 2019
@iapicca
Copy link

iapicca commented Oct 23, 2019

Hi @bjon
If you are still experiencing this issue
with the latest version of Flutter and FlutterFire plugin
can you please provide your updated flutter doctor -v
and your and your flutter run --verbose/flutter build --verbose ?
Also, to better address the issue, would be helpful
if you could post a self contained app on github
or the steps to reproduce it.
Thank you

@iapicca iapicca added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Oct 23, 2019
@AlexZaiats
Copy link
Contributor

I'm facing the same issue:
getIdToken(refresh: false will not refresh token on Android, but will refresh for iOS.
Here is a simple fix for the issue:
#1334

@iapicca iapicca added type: bug Something isn't working and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 20, 2019
@iapicca
Copy link

iapicca commented Nov 20, 2019

Thank you for your contribution @AlexZaiats
I see that your PR has been merged,
may I close this issue?

@iapicca iapicca added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Nov 20, 2019
@AZaiats
Copy link

AZaiats commented Nov 20, 2019

@iapicca sure, thanks

@iapicca iapicca closed this as completed Dec 13, 2019
@firebase firebase locked and limited conversation to collaborators Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants