Skip to main content

Overview

The Dynamic Swift SDK provides multiple authentication methods including Email OTP, SMS OTP, and Social Login. This guide covers how to implement each authentication method in your iOS application.

Prerequisites

  • Dynamic SDK initialized (see Installation Guide)
  • Dynamic Client instance created
  • Valid environment ID configured

Email OTP Authentication

Email OTP (One-Time Password) authentication allows users to sign in using their email address.

1. Send OTP to Email

2. Verify Email OTP

SMS OTP Authentication

SMS OTP authentication allows users to sign in using their phone number.

1. Send OTP via SMS

2. Verify SMS OTP

Social Authentication

Social authentication allows users to sign in using their existing social media accounts including Apple, Google, Twitter, Discord, GitHub, and Twitch. For detailed setup instructions, provider configuration, and implementation examples, see the Social Authentication Guide.

Authentication State Management

Check Authentication Status

Logout

Key Data Types

OTPVerification

The OTPVerification object is returned when sending an OTP and must be stored to verify the OTP later:

SdkUser

The SdkUser object represents an authenticated user: