/SignKit

Session Keeper for Swift

Primary LanguageSwiftMIT LicenseMIT

SignKit

Swift Platforms Swift Package Manager License

SignKit is easy session keeper for JWT-based service.

Requirements

Platform Minimum Swift Version Installation
iOS 11.0+ 5.5 Swift Package Manager

Installation

Swift Package Manager

  • File -> Add Packages... And paste the repository URL.
  • Or add it to the dependencies value of your Package.swift.
dependencies: [
  .package(url: "https://github.com/Mercen-Lee/SignKit.git", .branch("main"))
]

Usage

  • 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