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
- Host: GitHub
- URL: https://github.com/distroid/okauth
- Owner: distroid
- Created: 2014-05-28T22:58:13.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-04T12:04:59.000Z (about 12 years ago)
- Last Synced: 2025-02-08T08:10:58.257Z (over 1 year ago)
- Language: Ruby
- Size: 169 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 OkAuth.new(@options).get_auth_url
end
- 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
- Save userdata in DB and login him