SignKit is easy session keeper for JWT-based service.
Platform | Minimum Swift Version | Installation |
---|---|---|
iOS 11.0+ | 5.5 | Swift Package Manager |
File
->Add Packages...
And paste the repository URL.- Or add it to the
dependencies
value of yourPackage.swift
.
dependencies: [
.package(url: "https://github.com/Mercen-Lee/SignKit.git", .branch("main"))
]
- Login
Sign.login(
id: id,
password: password,
accessToken: accessToken,
refreshToken: refreshToken
)
- Logout
Sign.logout()
- Reissue AccessToken
Sign.reissue(accessToken)
- Check is Logged In
let isLoggedIn = Sign.isLoggedIn