mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
- Added Site settings > Authentication section - Create/edit/delete your custom oauth2 configurations - Login or signup with oauth2
15 lines
566 B
Ruby
15 lines
566 B
Ruby
class RegistrationsController < Devise::RegistrationsController
|
|
# Needed to have Current.tenant available in Devise's controllers
|
|
prepend_before_action :load_tenant_data
|
|
before_action :load_oauths, only: [:new]
|
|
|
|
# Override destroy to soft delete
|
|
def destroy
|
|
resource.status = "deleted"
|
|
resource.save
|
|
Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
|
|
set_flash_message :notice, :destroyed
|
|
yield resource if block_given?
|
|
respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) }
|
|
end
|
|
end |