From 410ace106e04481ccd413e035d70dff57a526368 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Fri, 12 Apr 2024 06:51:20 -0700 Subject: [PATCH] Launch NeoPass to all! <3 <3 --- app/helpers/application_helper.rb | 13 ------ app/views/auth_users/edit.html.erb | 2 +- app/views/devise/sessions/new.html.erb | 58 +++++++++++++------------- 3 files changed, 29 insertions(+), 44 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 97c58170..73a9cf9c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -69,19 +69,6 @@ module ApplicationHelper end end - # Add ?neopass=1 to the URL, or set the `neopass_access_secret=1` cookie, to - # view NeoPass features. (NOTE: In production, this is a secret value - # instead!) - # - # NOTE: We intentionally don't e.g. set the cookie just because you went to - # the secret URL once, to avoid demo users getting confused about - # whether NeoPass is publicly available: if they go to the public page, - # they should NOT see NeoPass anymore, rather than think it's live! - def can_use_neopass - params[:neopass] == Rails.configuration.neopass_access_secret || - cookies[:neopass_access_secret] == Rails.configuration.neopass_access_secret - end - def contact_email "matchu@openneo.net" end diff --git a/app/views/auth_users/edit.html.erb b/app/views/auth_users/edit.html.erb index 7266316e..a7f22210 100644 --- a/app/views/auth_users/edit.html.erb +++ b/app/views/auth_users/edit.html.erb @@ -98,7 +98,7 @@ disabled: !@persisted_auth_user.uses_password? && !@persisted_auth_user.email? %> <% end %> -<% elsif can_use_neopass %> +<% else %> <%= form_with url: auth_user_neopass_omniauth_authorize_path(intent: "connect"), method: :post, class: "settings-form", data: {turbo: false} do |form| %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 9f1cc169..90528f6f 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -29,38 +29,36 @@ - <% if can_use_neopass %> -
-
Have a NeoPass?
+ - <% end %> +
+ How does it work? +

+ If this is your first time using NeoPass at Dress to Impress, we'll + create a new DTI account for you automatically! +

+

+ You'll be asked for 3 permissions: OpenID and + Email tell us who you are, and + Linkage tells us your Neopets username. +

+

+ After that, you'll be able to one-click log in here, any time! +

+

+ To connect an existing DTI account, don't start here! Log in with + your password first, then check the Settings page. +

+
+
<% content_for :stylesheets do %>