bookingsync / bookingsync-engine Goto Github PK
View Code? Open in Web Editor NEWKickstart your BookingSync Application with this Rails 5+ Engine
License: MIT License
Kickstart your BookingSync Application with this Rails 5+ Engine
License: MIT License
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
We should either provide a solution or at least document this behavior, it's far to be expected and not easy to find the solution.
Add in config/environments/developement.rb
OmniAuth.config.full_host = "https://my-bookingsync-app.dev"
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
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)
When uid is not unique different things can happen, like finding wrong account by self.from_omniauth method.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.