So I'm looking to integrate a Discourse forum with the same authentication as the main app (Devise). It would be mainapp.com and forum.mainapp.com. A lot like codeschool and hummingbird has going.
I saw another SO Question that was asked a year ago and wondering if there have been any improvments/ideas on doing this.
A user would sign up at mainapp.com and be automatically signed in to forum.mainapp.com using their devise user details to fill discourse user fields.
As a fairly new ruby/rails developer It's a bit hard wrapping my head around what to do, although I suspect it starts at carrying a session cookie over from mainapp.com to forum.mainapp.com.
Wondering if this has become easier to do over the past year and if anyone can steer me in the right direction for implementing this.
Discourse now supports Single Sign On to integrate Discourse users with the main website now. Official documentation here:
https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045
Related
I am trying to build an application which will have a simple workflow where a user is emailed a specific URL which links to their account and provides them with a voucher for redemption.
Does anyone know of a good rails gem or other solution which would help me generate a user specific URL which is valid for a one time login to the application.
I've done a bunch of poking around on rubygems, github and stackoverflow and don't see anything obvious.
Hopefully this isn't an obvious question :)
Cheers
Kevin.
Most popular gem for user authentication is Devise.
https://www.ruby-toolbox.com/categories/rails_authentication
On the other hand Devise is very complex and it can be a little bit difficult to get the hang of it.
I'm looking at integrating a message board for a site I'm developing in rails. The new discourse board looks interesting http://www.discourse.org/ but there isn't much information about integrating into another site either via oauth2 or sso or perhaps using a rails engine type system. Has anyone succesfully set this up with an app like this?
thx
edit t
Is there a roadmap for how this integration could take place in the future? Parts of it look really intriguing but would like some more info on how this use case could be handled.
edit 2
Since this question is getting a fair amout of traffic, I want to add this post http://meta.discourse.org/t/integrating-discourse-with-current-user-database/6669 which goes over the SSO attempts going on at discourse currently. I have also been in contact with the people at thougtbot about their implementation.
I was interested in the same issue but here's what I found on Github issues:
The easiest way to get it running would be to install Discourse
outside of your app. We do offer the full source code if you want to
integrate with your existing login system, but I imagine it would be a
fair amount of work at this point.
Right now we haven't focused much on production deployments since
we're pre-beta and want to make sure people have a super easy upgrade
system in place to stay on top of security holes.
Not done any app with Discourse, but if their site does not provide a lot of info did you browse the Git Repository https://github.com/discourse/discourse it provides plenty of information and resources links like these ones :
Discourse Developer Install Guide (Vagrant) :
https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md
Developer Advanced :
https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md
Admin quick Start : https://github.com/discourse/discourse/wiki/The-Discourse-Admin-Quick-Start-Guide
Hope it can be of some help for you
Cheers
Im programming an app that has to be able to allow the users to sign up using their soundcloud accounts, so far I haven't found any usefull tutorial using Omniauth, Can anyone help me giving some tips to start with?
I gave a presentation to my local meetup about integrating OmniAuth into your application using a demo application here. You can fork it and go through the steps in section 3 of the README. There are also some slides you can look at here.
There's a lot of refactoring that needs to still be done, but it was designed to be a basic intro start to a bunch of people who had never used OmniAuth before.
I also list resources that helped with putting together the presentation. I highly recommend checking them out.
Although the examples are not with the omniauth-soundcloud, it should work similarly.
I'm trying to build a very simple Rails app where people can log in and then see a list of their Run Keeper Fitness Activities
I opted to use Devise and OmniAuth to handle the logins (complete with omniauth-runkeeper). All was working well, having followed Ryan Bates brilliant Railscast on the topic.
I was then keen to use the HealthGraph gem to connect to the RunKeeper API. To do so, it needs an access token. I opted to pull this at point of authorising the app, and record it in the user model (as outlined in this Gist) but I'm not sure this approach is quite right. Should I be recording this access token permanently in the database? I can easily create a new connection through the API now by using the following, but I'm concerned that this isn't the securest approach.
#user = HealthGraph::User.new(current_user.run_token)
Any advice or tips on a different approach would be greatly appreciated.
Ian
I'm trying to create a Facebook canvas app that allow users to write a custom Wall post and tag some friends. I'm familiar with stand alone rails apps, but I'm having a hard time grasping API interactions.
I've came across with a few gems (Facebooker2, Koala and fb_graph) and the Heroku integration that provide a easier way to use the GraphAPI, but I wasn't able to find updated examples on how to integrate them with a rails app from scratch. So far, the only one that I've found was this sample from fb_graph.
It seems that this type of application is pretty common of Facebook, so I was expecting to find more info on the community. Is there a better way to start developing for Facebook using Rails or should I just pick one of those gems and stick with it until I grasp the concepts?
I was able to create an Facebook canvas app using the fb_graph sample. Probably there are better solutions to handle Facebook authorization inside canvas, but the sample is a great start. Here is my project, a Music Quiz inside Facebook: https://github.com/luizbranco/MusicQuiz
I built my first Facebook app from scratch using Koala. Their wiki on Github is absolutely fantastic and everything is well explained.