mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Fix missing SSO JIT account creation template (#679)
* Add UI and functionality for new user registration via OIDC integration * Add tests and localization for new user registration via OIDC --------- Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
This commit is contained in:
@@ -102,10 +102,12 @@ class OidcAccountsController < ApplicationController
|
||||
# Security: JIT users should NOT have password_digest set to prevent
|
||||
# chained authentication attacks where SSO users gain local login access
|
||||
# via password reset.
|
||||
# Allow user to edit first_name and last_name from the form, but email comes from OIDC
|
||||
user_params = params.fetch(:user, {}).permit(:first_name, :last_name)
|
||||
@user = User.new(
|
||||
email: email,
|
||||
first_name: @pending_auth["first_name"],
|
||||
last_name: @pending_auth["last_name"],
|
||||
first_name: user_params[:first_name].presence || @pending_auth["first_name"],
|
||||
last_name: user_params[:last_name].presence || @pending_auth["last_name"],
|
||||
skip_password_validation: true
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user