|
|
|
@ -67,6 +67,7 @@ public class LoginActivity extends BaseActivity {
|
|
|
|
|
String scope = requestedAdmin ? Helper.OAUTH_SCOPES_ADMIN : Helper.OAUTH_SCOPES;
|
|
|
|
|
oauthVM.createToken(currentInstanceLogin, "authorization_code", client_idLogin, client_secretLogin, Helper.REDIRECT_CONTENT_WEB, scope, code)
|
|
|
|
|
.observe(LoginActivity.this, tokenObj -> {
|
|
|
|
|
if (tokenObj != null) {
|
|
|
|
|
Account account = new Account();
|
|
|
|
|
account.client_id = client_idLogin;
|
|
|
|
|
account.client_secret = client_secretLogin;
|
|
|
|
@ -90,6 +91,10 @@ public class LoginActivity extends BaseActivity {
|
|
|
|
|
WebviewConnectActivity.proceedLogin(LoginActivity.this, account);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Toasty.error(LoginActivity.this, getString(R.string.toast_token), Toast.LENGTH_LONG).show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|