https://github.com/distroid/okauth-gem
OkAuth gem
https://github.com/distroid/okauth-gem
Last synced: about 1 year ago
JSON representation
OkAuth gem
- Host: GitHub
- URL: https://github.com/distroid/okauth-gem
- Owner: distroid
- License: mit
- Created: 2014-05-31T16:38:26.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-02T13:28:10.000Z (about 12 years ago)
- Last Synced: 2025-06-11T11:28:17.633Z (about 1 year ago)
- Language: Ruby
- Size: 152 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
OkAuth
======
Auth class for www.odnoklassniki.ru
How to use
- First create aplication on odnoklassniki.ru
- 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
- 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
- Save userdata in DB and login him