For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.

Swift: Retrieve a new session

Examples

Refresh session using the current session

let session = try await supabase.auth.refreshSession()

Refresh the session only when needed

let session = try await supabase.auth.refreshSessionIfNeeded()