rotate
abstract suspend fun rotate(request: IB2BRecoveryCodesRotateParameters): B2BRecoveryCodesRotateResponse
Rotates the recovery codes for the current member's account, invalidating the previous set and generating a new set. Calls the POST /sdk/v1/b2b/recovery_codes/rotate endpoint. Requires an active session.
Kotlin:
StytchB2B.recoveryCodes.rotate(B2BRecoveryCodesRotateParameters())Content copied to clipboard
iOS:
let response = try await StytchB2B.recoveryCodes.rotate(B2BRecoveryCodesRotateParameters())Content copied to clipboard
React Native:
StytchB2B.recoveryCodes.rotate({})Content copied to clipboard
Return
B2BRecoveryCodesRotateResponse containing the newly generated recovery codes.
Parameters
request
IB2BRecoveryCodesRotateParameters — no fields required.
Throws
StytchError
if the request fails.
if the coroutine is cancelled.