Vk.com login (vkontakte)

(Bliketto) #22

plugin GitHub - stereobooster/discourse-vk-login: 🚨 [deprecated] VK.com login for Discourse not working for me
./launcher rebuild app failed


Pups::ExecError: cd /var/www/discourse/plugins && git https://github.com/stereobooster/discourse-vk-login.git failed with return #<Process::Status: pid 318 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home/plugins", "cmd"=>["git clone https://github.com/discourse/docker_manager.git", "git clone https://github.com/discourse/discourse-staff-notes.git", "git clone https://github.com/discourse/discourse-cakeday.git", "git clone https://github.com/discourse/discourse-oauth2-basic.git", "git clone https://github.com/discourse/discourse-tagging.git", "git clone https://github.com/tgxworld/discourse-narrative-bot.git", "git clone https://github.com/discourse/discourse-solved.git", "git clone https://github.com/discourse/discourse-canned-replies.git", "git https://github.com/stereobooster/discourse-vk-login.git", "cp discourse-vk-login/db/migrate/* db/migrate/"]}
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

(Sam Saffron) #23

There is not enough in that log to tell what happened

(Bliketto) #24

Sam, please help, log - http://pastebin.com/ewwBNkYD

(Sam Saffron) #25
Cloning into 'discourse-vk-login'...
I, [2017-01-30T14:11:59.054447 #13]  INFO -- :
I, [2017-01-30T14:11:59.055569 #13]  INFO -- : > cd /var/www/discourse/plugins && cp discourse-vk-login/db/migrate/* db/migrate/
cp: cannot create regular file 'db/migrate/': No such file or directory

Don’t know where these instructions came from but adding migrations via a plugin seems a bit of a worry to me. Regardless if it is doing so it should try to copy the migrations into /var/www/discourse/db/migrate as opposed to /var/www/discourse/plugins/db/migrate

(Kamil) #26

Hi Sam!

Should i use that plugin? Does it work correct now? There was no updates last 11 months.

(Sam Saffron) #27

You can try it out, why not?


The same thing is for me - the plugin cannot be installed.
Installation manual at GitHub - stereobooster/discourse-vk-login: 🚨 [deprecated] VK.com login for Discourse is wrong (
(besides missing “clone” in “git clone” command)


with this folder also doesn’t work,
if completely remove cp to migrate then plugin works in someway but it fails to substitute email, username and name, instead it substitutes user id into name/username fields.


I’m sorry for bothering but @sam, @stereobooster could you comment how to use VK plugin properly?

There’re two question:

  1. Is it necessary to install migrations? If so then how, as the mentioned in github’s README cmd doesn’t work:
    cp discourse-vk-login/db/migrate/* db/migrate/
  2. Currently after success signup via VK and returning to Discourse in the form creating new user no user name and alias are substituted into fields. Instead of them vk’s user id is substituted into that fields. Is it possible to fix?

(Sam Saffron) #31

I am reverting this to the original plugin I had.

If anyone wants to improve my original version

  • Do a PR for Discourse to add the auth table into the official discourse migrations.
  • Write some tests
  • Offer longer term support on the work, @stereobooster has been missing :frowning:


I’m sorry I don’t fully understand - what is the original plugin?
Could you you which one is the safest one to use currently?
I understand that it’s WIP and not finished and never was claimed to be. But I personally don’t know Ruby so I can’t work on it right now but I need very much VK integration… I’ve installed GitHub - stereobooster/discourse-vk-login: 🚨 [deprecated] VK.com login for Discourse (without migrations) but I wonder whether it’s safe to use.

(Sam Saffron) #33

Original was just a script on the first post, I will try to move it to github next week

(Dmitry) #34

Sam, is there any news?

(DD) #36

Hi , I am looking to achieve SSO in EDX.
Actually I have integrated discourse with Edx by rendering the Discourse in iframe. Every time when I login to EDX, I have to login to discourse as well.

Is there a way to achieve SSO ? when I logged into edx , it should also logged in discourse as well.

Also looking for “vkontakte” , but not sure how to use this.
How to use this plugin???

(Nate Flood) #37

If you don’t want to have the user log in twice you might override the CurrentUserProvider. You can see the very basic introduction on how to do that here: https://meta.discourse.org/t/amending-current-user-logic-in-discourse/

In this way you can use a cookie to indicate that a user is logged in. We’ve implemented a scheme like this, that uses a cookie to identify the session across all of the apps at our domain, and all of those apps use the cookie to get user details from Redis. It works very well because destroying the cookie or the entry in Redis ends the session across the site, and creating the cookie and storing the authenticated user details in Redis logs users into all the apps simultaneously.

(Сергей Савельев) #38

What value should be in the “redirect URI” field?

(Sam Saffron) #39

If anyone is interested in making this plugin more feature rich and taking ownership of it, let me know. I am not maintaining it anymore, it was only intended as a demo.