Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Commit 431504c

Browse files
author
Kevin King
committed
Handle krypton://verify_email links in addition to https:// links
1 parent 26d330a commit 431504c

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

app/src/main/java/co/krypt/krypton/team/onboarding/TeamOnboardingActivity.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,17 @@ protected void onNewIntent(Intent intent) {
118118
Uri data = intent.getData();
119119
if ((data.getScheme().equals("krypton") && data.getHost().equals("verify_email")) ||
120120
(data.getScheme().equals("https") && data.getHost().equals("krypt.co") && data.getPath().equals("/app/verify_email.html"))) {
121-
String nonce = data.getQueryParameter("nonce");
121+
122+
final String nonce;
123+
// Handle https:// link
124+
String queryParam = data.getQueryParameter("nonce");
125+
if (queryParam != null) {
126+
nonce = queryParam;
127+
} else {
128+
// Handle krypton:// link
129+
nonce = data.getLastPathSegment();
130+
}
131+
122132
Log.i(TAG, "received VERIFY_EMAIL intent");
123133
CreateTeamProgress createTeamProgress = new CreateTeamProgress(this);
124134
JoinTeamProgress joinTeamProgress = new JoinTeamProgress(this);

0 commit comments

Comments
 (0)