<% header_title @user_exists ? "Link OIDC Account" : "Create Account" %> <% if @user_exists %>

Verify Your Identity

To link your <%= @pending_auth["provider"] %> account<% if @pending_auth["email"].present? %> (<%= @pending_auth["email"] %>)<% end %>, please verify your identity by entering your password.

<%= styled_form_with url: create_link_oidc_account_path, class: "space-y-4", data: { turbo: false } do |form| %> <%= form.email_field :email, label: "Email", autofocus: false, autocomplete: "email", required: "required", placeholder: "Enter your email", value: @email %> <%= form.password_field :password, label: "Password", required: "required", placeholder: "Enter your password", autocomplete: "current-password" %>

This helps ensure that only you can link external accounts to your profile.

<%= form.submit "Link Account" %> <% end %> <% else %>

Create New Account

No account found with the email <%= @pending_auth["email"] %>. Click below to create a new account using your <%= @pending_auth["provider"] %> identity.

Email: <%= @pending_auth["email"] %>

<% if @pending_auth["name"].present? %>

Name: <%= @pending_auth["name"] %>

<% end %>
<% if @allow_account_creation %> <%= render DS::Button.new( text: "Create Account", href: create_user_oidc_account_path, full_width: true, variant: :primary, method: :post, data: { turbo: false } ) %> <% else %>

<%= t("oidc_accounts.link.account_creation_disabled") %>

<% end %>
<% end %>
<%= render DS::Link.new( text: "Cancel", href: new_session_path, variant: :default, class: "font-medium text-sm text-primary hover:underline transition" ) %>