An open API service indexing awesome lists of open source software.

https://github.com/distroid/okauth

Auth class for www.odnoklassniki.ru
https://github.com/distroid/okauth

Last synced: over 1 year ago
JSON representation

Auth class for www.odnoklassniki.ru

Awesome Lists containing this project

README

          

OkAuth
======

Auth class for www.odnoklassniki.ru

How to use


  1. First create aplication on odnoklassniki.ru

  2. Create action login by odnoklassniki.ru
    def loginByOk
    
    @options = {
    'client_id' => [your_app_client_id],
    'scope' => "VALUABLE ACCESS",
    'redirect_uri' => [callback_action],
    'client_secret' => [your_app_client_secret],
    }
    redirect_to OkAuth.new(@options).get_auth_url
    end


  3. Create callback action
    def loginByOkCallback
    
    @options = {
    'client_id' => [your_app_client_id],
    'scope' => "VALUABLE ACCESS",
    'redirect_uri' => [callback_action],
    'client_secret' => [your_app_client_secret],
    'application_key' => [your_app_client_public],
    }
    userOkData = OkAuth.new(@options).get_user_data(request.GET["code"])
    end


  4. Save userdata in DB and login him