DecaneDocs
Sign-inMethods
Sign-in

Sign-in methods

Every method returns a ConnectResult with the addresses and isNewUser.

Email code

kotlin
wallet.connectWithEmail(email)
val result = wallet.verifyEmailCode(email, code)

Phone code

kotlin
wallet.connectWithPhone("+2348012345678")   // E.164
val result = wallet.verifyPhoneCode("+2348012345678", code)

A token you already hold

kotlin
wallet.connectWithGoogleToken(idToken)                 // from Credential Manager / Google Sign-In
wallet.connectWithKingsChatToken(accessToken)          // a KingsChat access token
wallet.connectWithToken(myJwt, providerId = "prov-1")  // your own auth

The provider profile

result.profile carries the name, email, picture and username when the provider supplied them. Decane never stores it, so read it at sign-in.

Not in this version

connectWithGoogle(), connectWithX(), connectWithKingsChat() (Custom Tabs) and signInWithPasskey() are on the API already and throw DecaneException.CallSequence or PlatformHookMissing with a message that says so.