Trying to setup Auth0 to implement IdP initiated SSO with Rails.
I have created two different accounts. One created as IdP and another as SP. I have created a SAML connection on SP with IdP SSO settings:
- Response protocol as OpenID Connect
- Query string has below string
redirect_uri=http://localhost:3000/users/auth/auth0/callback&scope=openid email&response_type=code
Above redirect_uri is similar to my SP initiated callback url. And it is not authenticating my user. It works like a charm for SP initiated SSO.
Logs while authenticating on my rails server
INFO – omniauth: (auth0) Callback phase initiated.
ERROR – omniauth: (auth0) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
Also need to understand what should be an ideal workflow for multiple users login from common connection to avoid CSRF
Below are the gems version for integrating Auth0
gem ‘omniauth-auth0’, ‘2.0.0’
gem ‘omniauth’, ‘~> 1.2’
gem ‘oauth2’, ‘~> 1.0’