Strategy
A typed authentication or verification strategy, such as email_code or oauth_google.
The Clerk API exchanges strategies as plain strings, and the SDK's models keep exposing those raw strings (for example com.clerk.api.network.model.factor.Factor.strategy). Use the typed accessors next to them (for example com.clerk.api.network.model.factor.Factor.strategyType) to compare strategies without string literals:
when (val strategy = factor.strategyType) {
Strategy.EmailCode -> showEmailCodeInput()
Strategy.Password -> showPasswordInput()
is Strategy.OAuth -> showSocialButton(strategy.provider)
else -> showGenericFactor()
}Strategies the SDK does not know about decode to Unknown and keep their raw wire value, so a new server-side strategy never breaks decoding and round-trips unchanged. Two strategies are equal when their values are equal. Use Strategy.from to convert a raw string.
Inheritors
Types
A single-use backup code.
Enterprise SSO (SAML or OIDC) through an enterprise connection.
A Google One Tap / Credential Manager ID token.
A native OAuth token exchange strategy, oauth_token_<provider>.
A password-reset code sent by email.
A password-reset code sent by SMS.
A biometric credential stored on this device.