Signin on Localhost
Using this library has been an absolute charm. In Google Admin's SAML App setting I can click "Open App" and it will open my Google login and then redirect properly to https://localhost:SSLPORT/users/saml/auth and it works great. But when I direct people to /users/saml/sign_in` Google gives me an error which is weird. I thought it had to do with my use of localhost but don't understand the SAML sign in process well enough to know. Any ideas?
Thanks for your patience while I was busy and not watching issues! It's very possible that Google doesn't like a localhost URL. I've used localhost with OneLogin but not with any other IdP.
Do you still have the error and can you share it?
Yea so I still have the error. I can probably better debug it if I can understand the flow? When I send a user to the sign_in route which should redirect to Google, does Google send a request to get some type of verification or is all the needed information stored in that initial redirect?
The controller redirects to Google using the SAML config from config/initializers/devise.rb. It's a little abstracted but here's where it happens: https://github.com/apokalipto/devise_saml_authenticatable/blob/master/app/controllers/devise/saml_sessions_controller.rb#L16. Google shows a login form if one is needed, and then redirects back (hopefully to /users/saml/auth) with a SAMLResponse parameter containing the user information.