Package com.stytch.sdk.consumer
Stytch's consumer SDK makes it simple to seamlessly onboard, authenticate, and engage users. This SDK provides the easiest way for you to use Stytch on Android. With just a few lines of code, you can easily authenticate your users and get back to focusing on the core of your product.
magicLinks
otp
passwords
sessions
biometrics
oauth
passkeys
userManagement
The StytchClient object is your entrypoint to the Stytch Consumer SDK and is how you interact with all of our supported authentication products.
Each endpoint is explained in their respective READMEs and inline-documentation, but there are a few special methods on the StytchClient object to document here.
As mentioned in the /README.md, before making any Stytch authentication requests, you must configure the StytchClient:
StytchClient.configure(context, publicToken)This configures the API for authenticating requests and the encrypted storage helper for persisting session data across app launches.
StytchClient.handle() is the method you call for parsing out and authenticating deeplinks that your application receives. The currently supported deeplink types are: Email Magic Links, Third-Party OAuth, and Password resets. This method returns a ../common/DeeplinkHandledStatus.kt class which details the result of the authentication call.
For Email Magic Links and Third-Party OAuth deeplinks, it will return a Handled class containing either the authenticated response or error.
For Password Reset deeplinks, it will return a ManualHandlingRequired class containing the relevant token, so that you can provide an appropriate UI to the user for resetting their password. The returned token is used for making the subsequent StytchClient.passwords.resetByEmail() call.
Any other link types passed to this method will return a NotHandled class.
See: Description
-
Enum Summary Enum Description ConsumerAuthMethod ConsumerTokenType An enum representing the supported (consumer) token types that we can extract from a deeplink -
Object Summary Object Description StytchClient The StytchClient object is your entrypoint to the Stytch Consumer SDK and is how you interact with all of our supported authentication products.