-
Notifications
You must be signed in to change notification settings - Fork 144
chore(deps): bump puma from 5.6.9 to 7.2.1 in /examples/ruby-api #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dependabot
wants to merge
1
commit into
master
Choose a base branch
from
dependabot/bundler/examples/ruby-api/puma-7.2.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skip to main content
Quickstarts
Native/Mobile App
Add Login to Your iOS or macOS Application using the Auth0.swift SDK
Use AI to integrate Auth0
If you use an AI coding assistant like Claude Code, Cursor, or GitHub Copilot, you can add Auth0 authentication automatically in minutes using agent skills.Install:
npx skills add auth0/agent-skills --skill auth0-quickstart --skill auth0-swift
Then ask your AI assistant:
Add Auth0 authentication to my iOS app
Your AI assistant will automatically create your Auth0 application, fetch credentials, add the Auth0.swift SDK dependency, configure Auth0.plist, set up callback URLs, and implement login/logout flows. Full agent skills documentation →
Get Started
1
Create a new project
Create a new iOS or macOS project for this quickstart.In Xcode:
This creates a standard app with SwiftUI and Swift Package Manager support, perfect for Auth0 integration.
2
Add the Auth0 SDK
Add the Auth0 SDK to your project using your preferred package manager.
In Xcode:
3
Configure Auth0
Create a new Auth0 application and configure callback URLs.
https://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback,
YOUR_BUNDLE_IDENTIFIER://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback
https://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback,
YOUR_BUNDLE_IDENTIFIER://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback
4
Configure App Credentials
ClientId YOUR_AUTH0_CLIENT_ID Domain {yourDomain}Create Auth0.plist in your project directory:
Auth0.plist
Drag Auth0.plist into Xcode and ensure “Add to target” is checked.
5
Create the Authentication Service
Create AuthenticationService.swift to handle login, logout, and token storage.
Use CredentialsManager for token storage. The CredentialsManager class securely stores credentials in the Keychain and automatically refreshes expired access tokens. Always use it — do not store tokens in memory, UserDefaults, or localStorage.
AuthenticationService.swift
import Foundation
import Auth0
import Combine
@mainactor
class AuthenticationService: ObservableObject {
@published var isAuthenticated = false
@published var user: User?
@published var isLoading = false
@published var errorMessage: String?
}
6
Configure Authentication Flow (Optional)
To improve the user experience, you can minimize system alerts in the following ways:
Skip this step to use the default behavior with a permission alert. You can configure this later.
Requires: Paid Apple Developer account, iOS 17.4+/macOS 14.4+
Best for production apps.
8
Run your app
Press ⌘+R in Xcode.
CheckpointYou now have a fully functional Auth0 login in your iOS or macOS app!
Troubleshooting & Advanced
Common Issues & Solutions
Custom Domain Configuration
Production Deployment
Advanced Integration
Was this page helpful?
Add Login to Your ASP.NET OWIN Application
Previous
Add Login to Your Android Application using the Auth0.Android SDK
Next
x-twitter
github
linkedin
Developers
Developer Hub
Code Samples & Guides
Zero Index Newsletter
Blog
Changelog
Docs
Documentation
Quickstarts
APIs
SDK Libraries
Learn
Intro to IAM (CIAM)
Reports
Webinars
Support Center
Community
Help
FAQs
Auth0
Company
Our Customers
Compliance
Partners
Careers
Okta + Auth0
About us
Add Login to Your iOS or macOS Application using the Auth0.swift SDK - Auth0 Docs
Assistant
Responses are generated using AI and may contain mistakes.
Auth0.swiftquickstart.In12https://github.com/auth0/Auth0.swift3Auth0.plist45http://www.apple.com/DTDs/PropertyList-1.0.dtdAuthenticationService.swiftcredentials.usercredentialsManager.store68ASP.NETAuth0.AndroidDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Skip to main content
Quickstarts
Native/Mobile App
Add Login to Your iOS or macOS Application using the Auth0.swift SDK
Use AI to integrate Auth0
If you use an AI coding assistant like Claude Code, Cursor, or GitHub Copilot, you can add Auth0 authentication automatically in minutes using agent skills.Install:
npx skills add auth0/agent-skills --skill auth0-quickstart --skill auth0-swift
Then ask your AI assistant:
Add Auth0 authentication to my iOS app
Your AI assistant will automatically create your Auth0 application, fetch credentials, add the Auth0.swift SDK dependency, configure Auth0.plist, set up callback URLs, and implement login/logout flows. Full agent skills documentation →
Get Started
1
Create a new project
Create a new iOS or macOS project for this quickstart.In Xcode:
File → New → Project (or ⌘+Shift+N)
Select either:
iOS tab → App template
macOS tab → App template
Configure your project:
Product Name: Auth0-Sample
Interface: SwiftUI
Language: Swift
Use Core Data: Unchecked
Include Tests: Checked (recommended)
Choose a location and click Create
This creates a standard app with SwiftUI and Swift Package Manager support, perfect for Auth0 integration.
2
Add the Auth0 SDK
Add the Auth0 SDK to your project using your preferred package manager.
Swift Package Manager
CocoaPods
Carthage
In Xcode:
File → Add Package Dependencies… (or ⌘+Shift+K)
Enter the Auth0 SDK URL:
https://github.com/auth0/Auth0.swift
Add Package → Select your app target → Add Package
3
Configure Auth0
Create a new Auth0 application and configure callback URLs.
Go to Auth0 Dashboard
Applications > Create Application > Name it, select Native > Create
In the Settings tab, note your Client ID and Domain
Add the following URLs to Allowed Callback URLs:
iOS
macOS
https://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback, YOUR_BUNDLE_IDENTIFIER://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback
Add the following URLs to Allowed Logout URLs:
iOS
macOS
https://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback, YOUR_BUNDLE_IDENTIFIER://{yourDomain}/ios/YOUR_BUNDLE_IDENTIFIER/callback
Click Save Changes
4
Configure App Credentials
Create Auth0.plist in your project directory:
Auth0.plist
ClientId YOUR_AUTH0_CLIENT_ID Domain {yourDomain}Drag Auth0.plist into Xcode and ensure “Add to target” is checked.
5
Create the Authentication Service
Create AuthenticationService.swift to handle login, logout, and token storage.
Use CredentialsManager for token storage. The CredentialsManager class securely stores credentials in the Keychain and automatically refreshes expired access tokens. Always use it — do not store tokens in memory, UserDefaults, or localStorage.
Right-click your project → New File… → Swift File
Name it AuthenticationService
Replace contents with:
AuthenticationService.swift
import Foundation import Auth0 import Combine @mainactor class AuthenticationService: ObservableObject { @published var isAuthenticated = false @published var user: User? @published var isLoading = false @published var errorMessage: String? private let credentialsManager = CredentialsManager(authentication: Auth0.authentication()) init() { Task { await checkAuthenticationStatus() } } private func checkAuthenticationStatus() async { isLoading = true defer { isLoading = false } guard let credentials = try? await credentialsManager.credentials() else { isAuthenticated = false return } isAuthenticated = true // Get user info from the ID token user = credentials.user } func login() async { isLoading = true errorMessage = nil defer { isLoading = false } do { let credentials = try await Auth0 .webAuth() .scope("openid profile email offline_access") .start() _ = credentialsManager.store(credentials: credentials) isAuthenticated = true // Get user info from the ID token user = credentials.user } catch { errorMessage = "Login failed: (error.localizedDescription)" } } func logout() async { isLoading = true defer { isLoading = false } do { try await Auth0 .webAuth() .clearSession() _ = credentialsManager.clear() isAuthenticated = false user = nil } catch { errorMessage = "Logout failed: (error.localizedDescription)" } } }
6
Configure Authentication Flow (Optional)
To improve the user experience, you can minimize system alerts in the following ways:
Use Universal Links: This eliminates the ‘Open in “AppName”?’ prompt that appears during the redirect. Note: The ASWebAuthenticationSession permission alert will still appear.
Use Ephemeral Sessions: This eliminates all permission alerts. Note: This disables Single Sign-On (SSO) and shared cookies.
Skip this step to use the default behavior with a permission alert. You can configure this later.
Universal Links
Ephemeral Session
Auth0 Dashboard → Applications → Your app → Settings → Advanced Settings → Device Settings
Add Apple Team ID and bundle identifier → Save
Xcode: Target → Signing & Capabilities → + Capability → Associated Domains
Add: webcredentials:{yourDomain}
Requires: Paid Apple Developer account, iOS 17.4+/macOS 14.4+
Best for production apps.
8
Run your app
Press ⌘+R in Xcode.
Tap “Log In” → Permission alert (if using default) → Tap “Continue”
Complete login in browser
See your profile!
CheckpointYou now have a fully functional Auth0 login in your iOS or macOS app!
Troubleshooting & Advanced
Common Issues & Solutions
Custom Domain Configuration
Production Deployment
Advanced Integration
Was this page helpful?
Add Login to Your ASP.NET OWIN Application
Previous
Add Login to Your Android Application using the Auth0.Android SDK
Next
x-twittergithublinkedin
Developers
Developer HubCode Samples & GuidesZero Index NewsletterBlogChangelog
Docs
DocumentationQuickstartsAPIsSDK LibrariesLearnIntro to IAM (CIAM)ReportsWebinars
Support Center
CommunityHelpFAQsAuth0
Company
Our CustomersCompliancePartnersCareersOkta + Auth0About us
Add Login to Your iOS or macOS Application using the Auth0.swift SDK - Auth0 Docs
Assistant
Responses are generated using AI and may contain mistakes.
Run execute installC