ParseSwift login examples for Apple, Facebook, & Google login

I am looking for sample code for Apple, Facebook, & Google logins with ParseSwift. I have the Parse iOS SDK samples but they don’t carry over to ParseSwift. I have looked at the playground examples but they don’t cover this question from what I can see.

In your client application:

  1. Add the dependency (if any) of the respective 3rd party framework you want to login with
  2. Follow the respective SDK directions and examples for logging in
  3. When completing step 2, you will receive tokens/credentials from the respective SDK, pass them to ParseSwift using the matching method from the API documentation. If you don’t see a type for the 3rd party authentication you want to use, look in the Alternatives/Workarounds section here. An example of Apple login is below:

On the server-side, you may need to ensure your server is configured correctly.

If you would like to add tutorials for logging in or any others, see here for how to add them to the SDK.

1 Like


Thank you so much for taking the time. This was a tremendous help. I was able to log on using an Apple ID.

I did need to add var access_token: String? to my User class to log in. This was for the Back4App back end.

I’m not familiar with how Back4App works, but this is not required for ParseSwift with an out-of-the-box parse-server. In addition, using underscores in variable names isn’t standard in Swift. The standard is camel case, i.e. accessToken, You will want to ensure you follow the directions for configuring the server with apple. If you are using Back4app, I recommend you contact their support team to verify their requirements.