d066z / github-actions-for-packages

https://lab.github.com/githubtraining/github-actions:-publish-to-github-packages
MIT License
1 stars 0 forks source link

### Checklist before submitting a bug report #2

Open d066z opened 2 years ago

d066z commented 2 years ago

Checklist before submitting a bug report

Java version

1.8

Android version

31

Android SDK version

12.0.0

Installation platform & version

Gradle 7.0.2

Package

Login

Goals

If an user has registered 2 facebook accounts (A and B) and wants to use account B to login within my app, facebook login button only suggests account A

Expected results

To be able to prompt user to provide the credentials always, hit a button "this is not me" or just select from multiple choices

Actual results

image ``

Steps to reproduce

1 - Have Two accounts of facebook 2 - Use login button to log with Account A 3 - logout from my app 4 - Hit the login button and try login with account B 5 - facebook sdk only suggests account A and doesn't allow to clear cache

Code samples & details

LoginButton f = new LoginButton(this);
        f.setLoginBehavior(LoginBehavior.WEB_ONLY);
        f.registerCallback(cb, new FacebookCallback<LoginResult>() {
            @Override
            public void onSuccess(LoginResult loginResult) {
                loginWithFacebook();
            }

            @Override
            public void onCancel() {
                loginStarted = false;
                LoginManager.getInstance().logOut();
            }

            @Override
            public void onError(FacebookException error) {
                if (isValid())
                    new MaterialAlertDialogBuilder(LoginActivity.this, R.style.Igibo_AlertDialog).setTitle(R.string.facebookLoginError).setMessage(error.getMessage()).setPositiveButton(R.string.ok, null).show();
                LoginManager.getInstance().logOut();
                loginStarted = false;
            }
        });
        f.callOnClick();

Originally posted by @bolds07 in https://github.com/facebook/facebook-android-sdk/issues/1017