This repository contains a sample iOS app developed in Swift and an app backend developed using Serverless Swift functions.
The primary goal of this project was to develop a fully featured app backend in Swift and deploy to OpenWhisk. The sample provides the ability to:
- Register as a new user - this demonstrates how you can use a serverless function to connect and save information to a database.
- Login as the newly created user - this demonstrates how you can provide authentication and authorization services in a serverless infrastructure.
- Retrieve the logged in user's profile - this demonstrates how you can identify a user in a stateless serverless environment without sessions or cookies.
- Login using a 3rd party provider - this demonstrates how you can use OAuth2 with serverless functions, in this case we login using GitHub.
- Retrieve the logged in user's profile from the 3rd party - this demonstrates how you can make API calls to the 3rd party authentication system to retrieve profile information.
The best place to start is by deploying the Hello World example. This will walk you through installing the OpenWhisk CLI, deploying your first Swift function to OpenWhisk using a custom bash script (we'll explain why later), launching the sample iOS app from Xcode, and executing your Swift function.
Once you have deployed the Hello World example and would like to deploy and run the rest of the examples refer to the Authentication and Authorization README.
For more information on some of the challanges we faced and utilities we built to help support local development and testing refer to the Testing README.
For more information on how we support deploying to different environments and supporting 3rd party libraries in our functions refer to the Deployment README.