Code Monkey home page Code Monkey logo

bookingsync-engine's People

Contributors

azdaroth avatar chambeur avatar fredar avatar grk avatar julienitard avatar mandaryn avatar pr0d1r2 avatar stonefrog avatar thilonel avatar valexl avatar wijet avatar zencocoon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bookingsync-engine's Issues

Would be nice to have AuthHelpers included

For RSpec 3+

spec/rails_helper.rb

RSpec.configure do |config|
  config.include AuthHelpers
end

spec/support/auth_helpers.rb

module AuthHelpers
  def sign_in(account)
    allow(@controller).to receive(:authenticate_account!).and_return(true)
    allow(@controller).to receive(:current_account).and_return(account)
  end
end

Properly define engines routes

Routes should be defined on BookingSync::Engine and not on the Rails.application

BookingSync::Engine.routes.draw do
  get '/auth/:provider/callback', to: 'sessions#create'
  get '/auth/failure', to: 'sessions#failure'
  get '/signout' => 'sessions#destroy', as: :signout
end

without this they always are included at the end and any catchall route defined inside app will make them unreachable

Fix expired session redirect with js actions

When session is expired and user triggers js action (connect in apps) nothing happens.
Filter chain halted as :authenticate_account! rendered or redirected Completed 401 Unauthorized in 10ms (Views: 4.4ms | ActiveRecord: 0.0ms)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.