Skip to content
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

fix: Signing out clearing all user preferences #10

Closed
wants to merge 11 commits into from

Conversation

helpisdev
Copy link

Fixes a bug (unintended behavior) where performing a 'sign out with google' action, clears all user's shared preferences, even values not used by the plugin. Fixed it by just setting to null the values the plugin actually uses, since it already had a clear method that almost did exactly that, except for the user ID.

@ihorkozar
Copy link

@long1eu Hi, any updates on this?

// All Rights Reserved. 2022.
// Unauthorized copying of this file, via any medium is strictly prohibited.
// Proprietary and confidential.
// Written by Elias Kapareliotis <helpis@tutamail.com>.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? @helpisdev

import 'package:google_sign_in_dartio/google_sign_in_dartio.dart';
import 'package:googleapis/gmail/v1.dart';
import 'package:googleapis/people/v1.dart';
import 'package:googleapis_auth/googleapis_auth.dart';
import 'package:html_unescape/html_unescape.dart';

import 'platform_js.dart' if (dart.library.io) 'platform_io.dart';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please explain

DataStorage? storage,
UrlPresenter? presenter,
int? port,
final int? port,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we need to have an Options class that we should pass and not keep adding new values here.

@long1eu
Copy link
Owner

long1eu commented Jan 18, 2023

@long1eu Hi, any updates on this?

waiting for some clarifications

@helpisdev
Copy link
Author

Yes I'm sorry Android Studio config, I was just checking that. Seems that I had forgotten I had opened the pull request and while working on another private project things got pushed together, my mistake. I checked the git history and I don't see to have changed anything important after the merging other open prs. All the garbage commits are after that point. Since it's linear history up to there, theoretically a git hard reset should solve the issue. I'm currently working on it. Sorry for the inconvenience this happened due to my negligence.

@helpisdev
Copy link
Author

Again, I'm really sorry for the trouble, I feel kinda ashamed I didn't notice that earlier. Git reset hard and git push -f restored it to clear point and removed all the unnecessary garbage commits.

@long1eu
Copy link
Owner

long1eu commented Jan 18, 2023

Absolutely no problem. Thank you for your interest.

@long1eu
Copy link
Owner

long1eu commented Dec 8, 2023

Please recreate and let me know.

@long1eu long1eu closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants