Skip to content

Instantly share code, notes, and snippets.

@coderforhire
Created June 1, 2012 15:04
Show Gist options
  • Save coderforhire/2852785 to your computer and use it in GitHub Desktop.
Save coderforhire/2852785 to your computer and use it in GitHub Desktop.
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
def stripeplatform
# You need to implement the method below in your model
@user = User.find_for_stripeplatform_oauth(request.env["omniauth.auth"], current_user)
if @user.persisted?
flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "Stripeplatform"
sign_in_and_redirect @user, :event => :authentication
else
puts @user
end
end
end
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment