Commit e38ab918 authored by Michael Rose's avatar Michael Rose

auth: created accounts have a random password + skip email confirmation

parent 52654766
......@@ -64,7 +64,8 @@ class SsoController < DeviseController
def create_user_from_jwt
# TODO: Check if there's already a username.
user = User.new(:email => @jwt['dlp_email'], username: @jwt['dlp_username'], dlp_id: @jwt['dlp_id'], origin: 'sso')
user = User.new(:email => @jwt['dlp_email'], username: @jwt['dlp_username'], password: SecureRandom.uuid.gsub(/\-/,''), dlp_id: @jwt['dlp_id'], origin: 'sso')
user.skip_confirmation!
user.save!
user
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment