mirror of https://github.com/docusealco/docuseal
Three fixes uncovered while running the new omniauth_callbacks specs in a Ruby 4.0.1 container: - config/initializers/devise.rb: read GOOGLE_CLIENT_ID / SECRET / ALLOWED_DOMAINS directly from ENV instead of via Wabosign::*. The module isn't autoloadable yet at initializer-load time (Rails.root isn't set), but ENV is. The User model and controllers still go through Wabosign helpers, which load fine once Rails is up. - app/models/user.rb: stop passing `omniauth_providers:` when :omniauthable isn't in the modules list. Devise raises NoMethodError omniauth_providers= otherwise. Now both the module inclusion and the keyword are gated on Wabosign.google_sso_enabled? - spec/requests/users/omniauth_callbacks_spec.rb: post to user_google_oauth2_omniauth_callback_path instead of the hardcoded /users/auth/... URL. With devise_for :users, path: '/' the actual callback route is /auth/google_oauth2/callback. Also create a placeholder admin user so ApplicationController#maybe_redirect_to_setup doesn't intercept the request before the callback action runs. Schema dump and .gitignore (adds /vendor) bundled in. All 5 specs now pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>pull/687/head
parent
c77744fea1
commit
45ed368a26
Loading…
Reference in new issue