mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
this commit fixes #146 by making auth token to always be unique to device, it also adds submodule for translations however isn't working yet.
This commit is contained in:
parent
3e6bf27b56
commit
92cfe15270
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "/app/src/res/"]
|
||||
path = /app/src/res/
|
||||
[submodule "app/src/res/translations"]
|
||||
path = app/src/res/translations/
|
||||
url = https://github.com/k0shk0sh/FastHub-translations.git
|
||||
|
||||
@ -49,6 +49,7 @@ android {
|
||||
"src/main/res/layouts/main_layouts",
|
||||
"src/main/res/layouts/row_layouts",
|
||||
"src/main/res/layouts/other_layouts",
|
||||
"src/main/res/translations",
|
||||
"src/main/res"
|
||||
]
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.fastaccess.ui.modules.login;
|
||||
|
||||
import android.os.Build;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
@ -59,10 +60,10 @@ class LoginPresenter extends BasePresenter<LoginMvp.View> implements LoginMvp.Pr
|
||||
String authToken = Credentials.basic(username, password);
|
||||
AuthModel authModel = new AuthModel();
|
||||
authModel.setScopes(Arrays.asList("user", "repo", "gist", "notifications"));
|
||||
authModel.setNote(BuildConfig.APPLICATION_ID + "-" + authToken);//make it unique to FastHub.
|
||||
authModel.setNote(BuildConfig.APPLICATION_ID + "-" + authToken + "-" + Build.MODEL);//make it unique to FastHub.
|
||||
authModel.setClientSecret(BuildConfig.GITHUB_SECRET);
|
||||
UUID uuid = UUID.randomUUID();
|
||||
String fingerprint = BuildConfig.APPLICATION_ID + " - " + uuid;
|
||||
String fingerprint = BuildConfig.APPLICATION_ID + " - " + uuid + "-" + Build.MODEL;
|
||||
Observable<AccessTokenModel> loginCall = LoginProvider.getLoginRestService(authToken)
|
||||
.login(BuildConfig.GITHUB_CLIENT_ID, fingerprint, authModel);
|
||||
if (!InputHelper.isEmpty(twoFactorCode)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user