mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
use correct redirect_uri
This commit is contained in:
+11
-1
@@ -173,7 +173,17 @@
|
||||
<activity android:name=".RegistrationActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:windowSoftInputMode="stateUnchanged"
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<!-- this scheme is used as the redirect_url for getOauth2Url()
|
||||
and should be whitelisted by the supported oauth2 services -->
|
||||
<data android:scheme="chat.delta" android:path="/${applicationId}/auth" tools:ignore="AppLinkUrlError"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity android:name=".LogViewActivity"
|
||||
android:label="@string/pref_view_log"
|
||||
|
||||
@@ -217,7 +217,11 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
|
||||
|
||||
String email = emailInput.getText().toString();
|
||||
if (!TextUtils.isEmpty(email) ) {
|
||||
String redirectUrl = "https://localhost/delta/auth";
|
||||
|
||||
// the redirect-uri is also used as intent-filter in the manifest
|
||||
// and should be whitelisted by the supported oauth2 services
|
||||
String redirectUrl = "chat.delta:/"+BuildConfig.APPLICATION_ID+"/auth";
|
||||
|
||||
String oauth2url = DcHelper.getContext(this).getOauth2Url(email, redirectUrl);
|
||||
if (!TextUtils.isEmpty(oauth2url)) {
|
||||
new AlertDialog.Builder(this)
|
||||
|
||||
Reference in New Issue
Block a user