mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
17 lines
401 B
Ruby
17 lines
401 B
Ruby
# frozen_string_literal: true
|
|
|
|
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|
def openid_connect
|
|
OidcAccount.link(spree_current_user, request.env["omniauth.auth"])
|
|
|
|
redirect_to admin_oidc_settings_path
|
|
end
|
|
|
|
def failure
|
|
error_message = request.env["omniauth.error"].to_s
|
|
flash[:error] = t("devise.oidc.failure", error: error_message)
|
|
|
|
super
|
|
end
|
|
end
|