[editor] Auth to OSM via a browser always

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-05-23 14:31:58 +07:00
parent c4ca4c907b
commit 3032eb6dfe
3 changed files with 11 additions and 10 deletions

View File

@@ -58,20 +58,20 @@ public class OsmLoginFragment extends BaseMwmToolbarFragment
mProgress = view.findViewById(R.id.osm_login_progress);
final String dataVersion = DateUtils.getShortDateFormatter().format(Framework.getDataVersion());
if (BuildConfig.FLAVOR.equals("google"))
{
// Hide login and password inputs and Forgot password button
UiUtils.hide(view.findViewById(R.id.osm_username_container),
view.findViewById(R.id.osm_password_container),
mLostPasswordButton);
// TODO(@pastk): remove unused flow with users entering credentials into app's form
// Hide login and password inputs and Forgot password button
UiUtils.hide(view.findViewById(R.id.osm_username_container),
view.findViewById(R.id.osm_password_container),
mLostPasswordButton);
mLoginButton.setOnClickListener((v) -> loginWithBrowser());
}
mLoginButton.setOnClickListener((v) -> loginWithBrowser());
/* login via in-app form
else
{
mLoginButton.setOnClickListener((v) -> login());
mLostPasswordButton.setOnClickListener((v) -> Utils.openUrl(requireActivity(), Constants.Url.OSM_RECOVER_PASSWORD));
}
*/
String code = readOAuth2CodeFromArguments();
if (code != null && !code.isEmpty())