{"id":15017595,"url":"https://github.com/mamantoha/omniauth-vkontakte","last_synced_at":"2025-10-23T22:25:24.962Z","repository":{"id":1792338,"uuid":"2716263","full_name":"mamantoha/omniauth-vkontakte","owner":"mamantoha","description":"Vkontakte OAuth2 Strategy for OmniAuth","archived":false,"fork":false,"pushed_at":"2024-01-08T22:22:59.000Z","size":126,"stargazers_count":141,"open_issues_count":9,"forks_count":72,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-13T10:06:21.746Z","etag":null,"topics":["hacktoberfest","oauth2","omniauth","omniauth-vkontakte","ruby","ruby-library","vk","vkontakte"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"idflood/ThreeNodes.js","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mamantoha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-11-05T17:20:49.000Z","updated_at":"2024-06-20T07:37:12.000Z","dependencies_parsed_at":"2024-06-18T17:01:50.630Z","dependency_job_id":"0f2dd115-6694-4a3d-b68a-73734fc74fd6","html_url":"https://github.com/mamantoha/omniauth-vkontakte","commit_stats":{"total_commits":149,"total_committers":26,"mean_commits":5.730769230769231,"dds":0.2684563758389261,"last_synced_commit":"563c94545fcbac5e445f9065a3b3f29c3123788c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fomniauth-vkontakte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fomniauth-vkontakte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fomniauth-vkontakte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fomniauth-vkontakte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/omniauth-vkontakte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582907,"owners_count":22095518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","oauth2","omniauth","omniauth-vkontakte","ruby","ruby-library","vk","vkontakte"],"created_at":"2024-09-24T19:50:43.713Z","updated_at":"2025-10-23T22:25:24.957Z","avatar_url":"https://github.com/mamantoha.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OmniAuth VKontakte\n\n![Ruby](https://github.com/mamantoha/omniauth-vkontakte/workflows/Ruby/badge.svg)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/149c0614deef469faa49e1e8ae384bd3)](https://app.codacy.com/app/mamantoha/omniauth-vkontakte?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=mamantoha/omniauth-vkontakte\u0026utm_campaign=Badge_Grade_Dashboard)\n[![Gem Version][rubygems_badge]][rubygems]\n[![Maintainability](https://api.codeclimate.com/v1/badges/1ea61cb860f9f6aafb4f/maintainability)](https://codeclimate.com/github/mamantoha/omniauth-vkontakte/maintainability)\n\nThis is the unofficial [OmniAuth](https://github.com/intridea/omniauth) strategy for authenticating to VKontakte via OAuth.\nTo use it, you'll need to sign up for an OAuth2 Application ID and Secret\non the [Vkontakte Developers Page](http://vk.ru/dev).\n\n![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2.svg)\n\n## Installing\n\nAdd to your `Gemfile`:\n\n```ruby\ngem 'omniauth-vkontakte'\n```\n\nThen `bundle install`\n\n## Usage\n\n`OmniAuth::Strategies::Vkontakte` is simply a Rack middleware.\n\nHere's a quick example, adding the middleware to a Rails app in `config/initializers/omniauth.rb`:\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :vkontakte, ENV['VK_API_ID'], ENV['VK_API_SECRET']\nend\n```\n\n[See the example Sinatra app](https://github.com/mamantoha/omniauth-vkontakte/blob/master/examples/main.rb).\n\n## Configuring\n\nYou can configure several options, which you pass in to the `provider` method via a `Hash`:\n\n* `scope`: a comma-separated list of access permissions you want to request from the user. [Read the Vkontakte docs for more details](http://vk.ru/dev/permissions)\n* `display`: the display context to show the authentication page. Valid options include `page`, `popup` and `mobile`.\n* `lang`: specifies the language. Optional options include `ru`, `ua`, `be`, `en`, `es`, `fi`, `de`, `it`.\n* `image_size`: defines the size of the user's image. Valid options include `mini`(50x50), `bigger`(100x100), `bigger_x2`(200x200), `original`(200x*) and `original_x2`(400x*). Default is `mini`.\n* `info_fields`: specify which fields should be added to AuthHash when\n  getting the user's info. Value should be a comma-separated string as per http://vk.ru/dev/fields.\n* `redirect_url`: URL where code will be passed. This URL shall be a part of the domain specified in application settings http://vk.ru/dev/auth_sites.\n* `https`: 1 - allows you to receive https links to photos and other media. 0 - return an http links (the default).\n\nHere's an example of a possible configuration:\n\n```ruby\nuse OmniAuth::Builder do\n  provider :vkontakte, ENV['VKONTAKTE_KEY'], ENV['VKONTAKTE_SECRET'],\n           scope: 'friends,audio,photos',\n           display: 'popup',\n           lang: 'en',\n           https: 1,\n           image_size: 'original'\nend\n```\n\n## Authentication Hash\n\nHere's an example *Auth Hash* available in `request.env['omniauth.auth']`:\n\n```ruby\n{\"provider\"=\u003e\"vkontakte\",\n \"uid\"=\u003e\"1\",\n \"info\"=\u003e\n  {\"name\"=\u003e\"Павел Дуров\",\n   \"nickname\"=\u003e\"\",\n   \"first_name\"=\u003e\"Павел\",\n   \"last_name\"=\u003e\"Дуров\",\n   \"image\"=\u003e\"http://cs7001.vk.me/c7003/v7003079/374b/53lwetwOxD8.jpg\",\n   \"location\"=\u003e\"Росiя, Санкт-Петербург\",\n   \"urls\"=\u003e{\"Vkontakte\"=\u003e\"http://vk.ru/durov\"}},\n \"credentials\"=\u003e\n  {\"token\"=\u003e\n    \"187041a618229fdaf16613e96e1caabc1e86e46bbfad228de41520e63fe45873684c365a14417289599f3\",\n   \"expires_at\"=\u003e1381826003,\n   \"expires\"=\u003etrue},\n \"extra\"=\u003e\n  {\"raw_info\"=\u003e\n    {\"id\"=\u003e1,\n     \"first_name\"=\u003e\"Павел\",\n     \"last_name\"=\u003e\"Дуров\",\n     \"sex\"=\u003e2,\n     \"nickname\"=\u003e\"\",\n     \"screen_name\"=\u003e\"durov\",\n     \"bdate\"=\u003e\"10.10.1984\",\n     \"city\"=\u003e{\"id\"=\u003e2, \"title\"=\u003e\"Санкт-Петербург\"},\n     \"country\"=\u003e{\"id\"=\u003e1, \"title\"=\u003e\"Росiя\"},\n     \"photo\"=\u003e\"http://cs7001.vk.me/c7003/v7003079/374b/53lwetwOxD8.jpg\",\n     \"photo_big\"=\u003e\"http://cs7001.vk.me/c7003/v7003736/3a08/mEqSflTauxA.jpg\",\n     \"online\"=\u003e1,\n     \"online_app\"=\u003e\"3140623\",\n     \"online_mobile\"=\u003e1}}}\n```\n\nThe precise information available may depend on the permissions which you request.\n\n## Supported Rubies\n\nTested with the following Ruby versions:\n\n- Ruby MRI (3.2.0+)\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/omniauth-vkontakte/fork\u003e)\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## License\n\nCopyright: 2011-2025 Anton Maminov (anton.maminov@gmail.com)\n\nThis library is distributed under the MIT license. Please see the LICENSE file.\n\n[rubygems_badge]: http://img.shields.io/gem/v/omniauth-vkontakte.svg?style=flat\n[rubygems]: http://rubygems.org/gems/omniauth-vkontakte\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fomniauth-vkontakte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fomniauth-vkontakte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fomniauth-vkontakte/lists"}