You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keygen.logger.info{"[sso] creating new user: profile_id=#{profile.id.inspect} organization_id=#{profile.organization_id.inspect} account_id=#{account.id.inspect}"}
87
+
86
88
new_user.sso_profile_id=profile.id
87
89
new_user.sso_connection_id=profile.connection_id
88
90
new_user.sso_idp_id=profile.idp_id
@@ -113,17 +115,21 @@ def callback
113
115
role=name.underscore.to_sym# pattern matching expects a symbol
114
116
115
117
unlessuser.roleinRole(^role)
118
+
Keygen.logger.info{"[sso] changing user role: profile_id=#{profile.id.inspect} organization_id=#{profile.organization_id.inspect} account_id=#{account.id.inspect} user_id=#{user.id.inspect} user_role=#{role.inspect}"}
119
+
116
120
user.change_rolerole
117
121
end
118
122
end
119
123
120
-
unlessuser.errors.empty?
124
+
unlessuser.valid?
121
125
Keygen.logger.warn{"[sso] user is not valid: profile_id=#{profile.id.inspect} organization_id=#{profile.organization_id.inspect} account_id=#{account.id.inspect} user_id=#{user.id.inspect} error_messages=#{user.errors.messages.inspect}"}
122
126
123
127
raiseKeygen::Error::InvalidSingleSignOnError.new('user is not valid',code: 'SSO_USER_INVALID')
124
128
end
125
129
126
130
session=user.transactiondo
131
+
Keygen.logger.info{"[sso] creating new session: profile_id=#{profile.id.inspect} organization_id=#{profile.organization_id.inspect} account_id=#{account.id.inspect} user_id=#{user.id.inspect}"}
0 commit comments