0

I've setup a sso-provider and a sso-client in rails 7. Thats working fine. But when I want to create and existing rails 6 project as a sso-client, there is a problem.

In rails 7 sso-client I have used repost to redirect, thats working as normal redirect_to is not working. But in rails 6 sso-client repost giving an error, saying

unless verified_request?
  raise ActionController::InvalidAuthenticityToken
end

so, I tried normal redirect_to. Thats working fine for redirect. But after signin in sso it redirect me to

#{SSO_CLIENT_URL}/auth/sso/callback?code=bea8c2b44579dd3f41480783336c611d&response_type=code&state=8c501a3321576c3a55678f854c687edef2cbb08c3844fd05

this part is giving error, saying

OmniAuth::Strategies::OAuth2::CallbackError
csrf_detected | CSRF detected


def raise_out!
  raise(env['omniauth.error'] || OmniAuth::Error.new(env['omniauth.error.type']))
end

This part is working in rails 7 sso-client.

0 Answers0