Skip to content

Commit

Permalink
Fix issues with aggregate login
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Nov 24, 2020
1 parent c7cdf52 commit 61599ed
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/chai.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,15 @@ public void launch(View view) {
this.selectedLoginVerifier.getVerifier(),
this.selectedLoginVerifier.getClientId(), builder.build())).get();
}
// TorusAggregateLoginResponse torusAggregateLoginResponse;
// torusAggregateLoginResponse = this.torusSdk.triggerAggregateLogin(new AggregateLoginParams(AggregateVerifierType.SINGLE_VERIFIER_ID, "google-auth0-gooddollar", new SubVerifierDetails[]{
// new SubVerifierDetails(LoginType.GOOGLE, "google-shubs", "1015336103925-reqktqs0ns9vfaeh7nbt8mi634u9157k.apps.googleusercontent.com")
// })).get();

// Gson gson = new Gson();
// String json = gson.toJson(torusLoginResponse);
String json = torusLoginResponse.getPublicAddress();
// String json = torusAggregateLoginResponse.getPublicAddress();
Log.d(MainActivity.class.getSimpleName(), json);
runOnUiThread(() -> ((TextView) findViewById(R.id.output)).setText(json));
} catch (Exception e) {
Expand Down
8 changes: 4 additions & 4 deletions torusdirect/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.0.14"
versionName "1.0.15"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -33,10 +33,10 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
api 'androidx.browser:browser:1.2.0'
// api 'com.google.androidbrowserhelper:androidbrowserhelper:1.3.2'
implementation 'com.auth0:java-jwt:3.10.3'
implementation 'com.squareup.okhttp3:okhttp:4.8.0'
implementation 'com.auth0:java-jwt:3.11.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'org.torusresearch:fetch-node-details-java:1.0.7'
implementation 'org.torusresearch:torus-utils-java:1.0.3'
implementation 'org.torusresearch:torus-utils-java:1.0.4'
implementation 'com.google.code.gson:gson:2.8.6'
//noinspection GradleDependency
api 'org.web3j:crypto:4.6.0-android'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public CompletableFuture<TorusAggregateLoginResponse> triggerAggregateLogin(Aggr
aggregateVerifierId = userInfo.getVerifierId();
}
Collections.sort(aggregateIdTokenSeeds);
String aggregateIdToken = Hash.sha3(String.join(Character.toString((char) 29), aggregateIdTokenSeeds));
String aggregateTokenString = String.join(Character.toString((char) 29), aggregateIdTokenSeeds);
String aggregateIdToken = Hash.sha3String(aggregateTokenString).substring(2);
aggregateVerifierParams.setVerifier_id(aggregateVerifierId);
HashMap<String, Object> aggregateVerifierParamsHashMap = new HashMap<>();
aggregateVerifierParamsHashMap.put("verify_params", aggregateVerifierParams.getVerify_params());
Expand Down

0 comments on commit 61599ed

Please sign in to comment.