{"repo":"descope/descope-swift","free":true,"listed":false,"github":"https://github.com/descope/descope-swift","clone":"git clone https://github.com/descope/descope-swift.git","description":"Swift library (iOS) used to integrate with Descope","language":"Swift","stars":43,"topics":["authentication","mobile","sdk","swift","descope","ios","iphone","swift-sdk","apple"],"license":null,"category":"mobile-apps","readme_excerpt":"DescopeKit DescopeKit is the Descope SDK for Swift. It provides convenient access to the Descope user management and authentication APIs for applications written in Swift. You can read more on the Descope Website. Setup Add the DescopeKit package using the Swift package manager. Within Xcode, go to File Add Package Dependencies and enter the URL of the repo in the search box at the top of the dialog: Set the dependency rule as appropriate and press the Copy Dependency button to confirm. The project navigator panel will show DescopeKit under package dependencies and you can import DescopeKit in your code. Note that the Descope SDK supports projects with a deployment target of iOS 13 and above and macOS 12 and above. Quickstart A Descope Project ID is required to initialize the SDK. Find it on the project page in the Descope Console. You can authenticate a user in your application by starting one of the authentication methods. For example, let's use OTP via email: We finish the authentication by verifying the OTP code the user entered: The session manager will automatically load the session from the keychain the next time the application is launched. At that point we might check if there's a logged in user to decide which screen to show: We use the active session to authenticate an outgoing API request to the application's backend: Session Management The DescopeSessionManager class is used to manage an authenticated user session for an application. The session manager takes car","default_branch":null,"files":null,"tree":[],"storefront":"/r/descope","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/descope/descope-swift/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}