Discourse-saml + Okta endless redirect

So it’s now pulling in the correct data for the email field, but gives “Something went wrong” when the user proceeds to create a new account.

The logs show an error with "Undefined method 'strip' in /app/controllers/users_controller" at line 311, and I think it’s because strip expects a string, and it’s getting an object. But if I add .to_s to result.email = auth.extra[:raw_info].attributes['screenName'], the new user’s email shows up as ["jeremy.miller+test@teamrubiconusa.org"] so that’s not quite the right solution…

I’m not a Ruby or Rails developer, so I’m not sure the correct way to handle this; any thoughts?

Edit: turns out this is all I needed to do:

result.email = auth.extra[:raw_info].attributes['screenName'].try(:first)