Project

oauth-ok

0.0
No commit activity in last 3 years
No release in over 3 years
Auth from Odnoklassniki.ru
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0
 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 Oauth::Ok::OkAuth.new(@options).getAuthUrl
    end
    
  3. Create callback action
    def loginByOkCallback
    	get = request.GET
    	@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 = Oauth::Ok::OkAuth.new(@options).getUserData(get["code"])
    end
    
  4. Save userdata in DB and login him