in core-android/src/main/java/com/uber/sdk/android/core/auth/LoginActivity.java [276:309]
protected void loadUrl() {
Intent intent = getIntent();
sessionConfiguration = (SessionConfiguration) getIntent().getSerializableExtra(EXTRA_SESSION_CONFIGURATION);
responseType = (ResponseType) getIntent().getSerializableExtra(EXTRA_RESPONSE_TYPE);
productPriority = (ArrayList<SupportedAppType>) intent.getSerializableExtra(EXTRA_PRODUCT_PRIORITY);
if (!validateRequestParams()) {
return;
}
String redirectUri = sessionConfiguration.getRedirectUri() != null ? sessionConfiguration
.getRedirectUri() : getApplicationContext().getPackageName().concat(".uberauth://redirect");
if (intent.getBooleanExtra(EXTRA_SSO_ENABLED, false)) {
SsoDeeplink ssoDeeplink = ssoDeeplinkFactory.getSsoDeeplink(this, productPriority, sessionConfiguration);
if (ssoDeeplink.isSupported(SsoDeeplink.FlowVersion.REDIRECT_TO_SDK)) {
ssoDeeplink.execute(SsoDeeplink.FlowVersion.REDIRECT_TO_SDK);
} else {
onError(AuthenticationError.INVALID_REDIRECT_URI);
}
return;
}
String requestUri = intent.getStringExtra(EXTRA_REQUEST_URI);
boolean isRedirectToPlayStoreEnabled = intent.getBooleanExtra(EXTRA_REDIRECT_TO_PLAY_STORE_ENABLED, false);
if (responseType == ResponseType.CODE) {
loadWebPage(redirectUri, ResponseType.CODE, sessionConfiguration, requestUri);
} else if (responseType == ResponseType.TOKEN && !(AuthUtils.isPrivilegeScopeRequired(sessionConfiguration.getScopes())
&& isRedirectToPlayStoreEnabled)) {
loadWebPage(redirectUri, ResponseType.TOKEN, sessionConfiguration, requestUri);
} else {
redirectToInstallApp(this);
}
}