![image](https://private-user-images.githubusercontent.com/32936811/389213133-4f8e5575-d7c6-4bdb-8f64-66b9be0c0874.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NDM3NTIsIm5iZiI6MTczODg0MzQ1MiwicGF0aCI6Ii8zMjkzNjgxMS8zODkyMTMxMzMtNGY4ZTU1NzUtZDdjNi00YmRiLThmNjQtNjZiOWJlMGMwODc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDEyMDQxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQxMzkwYjllNjY3M2FlYTk0N2Y0NWQyMGI2MWMzNDRiNjY3ZTVhNTE4ZWY4NWM3ZjhiYjAzNTA1ODY4OGI2ZTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QEiRfoXswY3DyTueCoD4uK6iiDatIske2uFqqqzn_6M)
Welcome to Descope's Native Flows Swift Sample App, a demonstration of how to integrate Descope native flows for user authentication within a Swift application. By exploring this project, you can understand how Descope works with Swift to manage native flows. For an example with all authentication methods, refer to the Swift Sample App.
This sample app includes:
- App Client: An example of how the client communicates with Descope.
Follow these steps to run the sample app and explore Descope's capabilities with Swift:
Make sure you have the following installed:
- XCode
- an IOS Simulator
- Clone this repo
- Open the project within Xcode
- Within the project settings of the project, change the
myProjectId
(If in a non-US region, or using a custom domain with CNAME, replacemyBaseURL
with your specific localized base URL)
- (Optional) Self-Host Your Flow: Your Descope authentication flow is automatically hosted by Descope at
https://auth.descope.io/<your_descope_project_id>
but you can use your own website or domain to host your flow. You can modify the value for the flow URL in the Flow Controller files to include your own hosted page with our Descope Web Component, as well as alter the?flow=sign-up-or-in
parameter to run a different flow.
let flow = DescopeFlow(url: "https://api.descope.com/login/\(Descope.config.projectId)?flow=sign-up-or-in")
For more information about Auth Hosting, visit our docs on it here
-
Run the simulator within Xcode - The play button located in the top left
-
Change the value of the
appInterface
value inAppInterface.swift
to see other examples of authentication screens
- Enchanted link currently does not route back to the application. You will need to validate the token externally from a web or backend client.
- https://docs.descope.com/build/guides/client_sdks/enchanted-link/#user-verification
- https://docs.descope.com/build/guides/backend_sdks/enchanted-link/#user-verification
To learn more please see the Descope Documentation and API reference page.
If you need help you can contact us
Descope's Native Flows Swift Sample App is licensed for use under the terms and conditions of the MIT license Agreement.