Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Torus OpenLogin SDK for iOS applications.

## Requirements

- iOS 12+ (older version support coming soon)
- iOS 12+
- Xcode 11.4+ / 12.x
- Swift 4.x / 5.x

Expand Down Expand Up @@ -33,23 +33,22 @@ import OpenLogin
2. Present the In-App Web-based Login modal. The user should see a permission dialog.

```
OpenLogin
.webAuth()
.login(provider: .GOOGLE) {
switch $0 {
case .success(let result):
print("""
Signed in successfully!
Private key: \(result.privKey)
User info:
Name: \(result.userInfo.name)
Profile image: \(result.userInfo.profileImage ?? "N/A")
Type of login: \(result.userInfo.typeOfLogin)
""")
case .failure(let error):
print("Error: \(error)")
}
}
OpenLogin()
.login(OLInitParams(loginProvider: .GOOGLE)) {
switch $0 {
case .success(let result):
print("""
Signed in successfully!
Private key: \(result.privKey)
User info:
Name: \(result.userInfo.name)
Profile image: \(result.userInfo.profileImage ?? "N/A")
Type of login: \(result.userInfo.typeOfLogin)
""")
case .failure(let error):
print("Error: \(error)")
}
}
```

## Configuration
Expand All @@ -75,4 +74,4 @@ In your application bundle add a plist file named **OpenLogin.plist** with the f

## Next steps

See example app in [App](/App)
See example app in [OpenloginSwiftSdkDemo](/OpenloginSwiftSdkDemo)