Contents

oneTimeCodes(preferredDuration:)

Stream one-time codes received by the system.

Declaration

@MainActor func oneTimeCodes(preferredDuration: TimeInterval = 600) async throws -> some AsyncSequence<ASVerificationCode, any Error>

Parameters

  • preferredDuration:

    How long the stream should ideally remain connected. This duration is not guaranteed and defaults to 10 minutes.

Discussion

When requested, the user may decide whether your app may receive one-time codes. This stream will automatically disconnect after a period of time.