Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import co.reachfive.identity.sdk.core.models.OpenIdUser;
import co.reachfive.identity.sdk.core.models.SdkConfig;
import co.reachfive.identity.sdk.core.models.requests.ProfileSignupRequest;
import co.reachfive.identity.sdk.core.models.responses.SignupResponse;
import co.reachfive.identity.sdk.facebook.FacebookProvider;
import co.reachfive.identity.sdk.google.GoogleProvider;
import co.reachfive.identity.sdk.webview.WebViewProvider;
Expand Down Expand Up @@ -103,7 +104,9 @@ public void onCreate(Bundle savedInstanceState) {
);
reach5.signup(
signupRequest,
this::handleLoginSuccess,
success -> {
showToast("test");
},
failure -> {
Log.d(TAG, "signup error=" + failure.getMessage());
showToast("Signup With Password Error " + failure.getMessage());
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/co/reachfive/identity/sdk/demo/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import co.reachfive.identity.sdk.core.models.requests.ProfileSignupRequest
import co.reachfive.identity.sdk.core.models.requests.ProfileWebAuthnSignupRequest
import co.reachfive.identity.sdk.core.models.requests.StartStepUpLoginFlow
import co.reachfive.identity.sdk.core.models.requests.webAuthn.WebAuthnLoginRequest
import co.reachfive.identity.sdk.core.models.responses.SignupResponse
import co.reachfive.identity.sdk.demo.AuthenticatedActivity.Companion.AUTH_TOKEN
import co.reachfive.identity.sdk.demo.AuthenticatedActivity.Companion.SDK_CONFIG
import co.reachfive.identity.sdk.demo.databinding.*
Expand Down Expand Up @@ -188,7 +189,14 @@ class MainActivity : AppCompatActivity() {
this.reach5.signup(
profile = signupRequest,
redirectUrl = redirectUrlBinding.text.toString().ifEmpty { null },
success = { handleLoginSuccess(it) },
success = {
when(it) {
is SignupResponse.AchievedLogin -> handleLoginSuccess(it.authToken)
is SignupResponse.AwaitingIdentifierVerification -> {
showToast("Signup occurred but awaiting identifier verification")
}
}
},
failure = {
Log.d(TAG, "signup error=$it")
showErrorToast(it)
Expand Down