Swift SDK for Pluto login microservice, which simplify the implementation for signing in with email, Google and Apple.
The Swift SDK for Pluto is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'PlutoSDK'
To auth with Pluto, set up it at first in your AppDelegate
class.
Pluto.shared.setup(server: "[server url]", appId: "[app id]")
Implement signing in and signing up with the following methods
Pluto.shared.register()
Pluto.shared.resendValidationEmail()
Pluto.shared.loginWithAccount()
Pluto.shared.loginWithGoogle()
Pluto.shared.loginWithApple()
Pluto.shared.resetPassword()
Pluto.shared.logout()
After signing in, get token or the header with token with the following methods
Pluto.shared.getToken()
Pluto.shared.getHeaders()
Get and update user information with
Pluto.shared.currentUser
Pluto.shared.myInfo()
Pluto.shared.updateName()
Pluto.shared.uploadAvatar()
Get scopes from jwt token with
Pluto.shared.getScopes()
Bind and unbind accounts
Pluto.shared.bind()
Pluto.shared.unbind()
Get avaliable login types and bindings
Pluto.shared.availiableLoginTypes
Pluto.shared.availiableBindings
Support the following debug method for DEBUG
and ADHOC
mode:
Pluto.shared.simulateInvalidRefreshToken
Pluto.shared.simulateInvalidAccessToken
Pluto.shared.resetExpire
lm2343635, [email protected]
Pluto Swift Client SDK is available under the MIT license. See the LICENSE file for more info.