Latest1.0.1
Homepagehttps://github.com/WeezLabs/rwauth-ios
LicenseMIT
Platformsios 8.0, requires ARC

RWAuth-ios

Cocoapods Compatible

iOS lib written in Swift that takes care about all basic auth features provided by any RW backend.

Features

  • [x] Sign Up
  • [x] Sign In
  • [x] Sign Out
  • [x] Request Recovery Code
  • [x] Set New Password
  • [x] Check Email
  • [x] Manualy Tokens Refresh

Requirements

  • iOS 8.0+
  • Xcode 7.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate RWAuth into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '8.0'
use_frameworks!

pod 'RWAuth'

Then, run the following command:

$ pod install

Usage

AuthPath

Standart Auth Path defined in AuthPath.swift. If you want to change defaults paths, scheme and host appropriately to yours Auth Paths, do next:

AuthPath.signUp = "/new/signup/path"

User

To access auth fuctionality use User’s class methods. For example:

User.signInWithEmail(email, password: password) { (innerResult) -> Void in
    // do something with innerResult
}

Result

Most methods have closure argument of type Result<Any, NSError>. That type may contains parsed JSON as [String: AnyObject] or NSError with error discription.

Latest podspec

{
    "name": "RWAuth",
    "version": "1.0.1",
    "license": "MIT",
    "summary": "Auth library written in swift",
    "homepage": "https://github.com/WeezLabs/rwauth-ios",
    "authors": "Weezlabs",
    "source": {
        "git": "https://github.com/WeezLabs/rwauth-ios.git",
        "tag": "1.0.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Source/*.swift"
}

Pin It on Pinterest

Share This