Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

74 auth via email link gem passwordless #75

Merged
merged 28 commits into from
Nov 9, 2022
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bc15fcc
add passwordless
yshmarov Nov 8, 2022
d2e34ba
add gem letter-opener
yshmarov Nov 8, 2022
973942c
add passwordless views
yshmarov Nov 8, 2022
333b627
make sign in work
yshmarov Nov 8, 2022
0775293
users#show, basic views work
yshmarov Nov 8, 2022
bb9897a
Update new.html.erb
yshmarov Nov 8, 2022
6830e43
no more need to load insta user in session
yshmarov Nov 8, 2022
c9c0bac
insta user belongs to user
yshmarov Nov 8, 2022
a56e780
add passwordless initializer
yshmarov Nov 8, 2022
babb292
prepare for sending emails in production
yshmarov Nov 8, 2022
2ea5c44
require user for users controller, i18n
yshmarov Nov 8, 2022
37d2719
Update new.html.erb
yshmarov Nov 8, 2022
fcc20b6
associate insta user with user
yshmarov Nov 8, 2022
a6e15ff
display insta users of a user
yshmarov Nov 8, 2022
a88413a
no need for user partial in insta users index
yshmarov Nov 8, 2022
479b9d7
validation for import action
yshmarov Nov 8, 2022
074b6c0
move import action from ig_posts to ig_user
yshmarov Nov 8, 2022
0b4bcbb
Update show.html.erb
yshmarov Nov 8, 2022
edb31c7
Update show.html.erb
yshmarov Nov 8, 2022
0e9acd5
fix import
yshmarov Nov 9, 2022
52e1237
depreciate insta_user#show in favour of insta posts#index
yshmarov Nov 9, 2022
e9f56ef
Update new.html.erb
yshmarov Nov 9, 2022
3dafeba
after connect insta account redirect to user path
yshmarov Nov 9, 2022
32e2b91
Update users_controller.rb
yshmarov Nov 9, 2022
5e62487
annotate routes
yshmarov Nov 9, 2022
02573bb
update tests
yshmarov Nov 9, 2022
18c48da
update AWS SES creds for prod
yshmarov Nov 9, 2022
2fec4b0
Update user.rb
yshmarov Nov 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update new.html.erb
  • Loading branch information
yshmarov committed Nov 8, 2022
commit 37d271910339560c731968b31737b35cb91e8639
17 changes: 13 additions & 4 deletions app/views/passwordless/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<div class='text-center'>
Enter your email to continue.
<div class='text-center space-y-4'>
<h1 class='font-semibold text-4xl'>
<i class="fa-solid fa-wand-magic-sparkles"></i>
<i class="fa-regular fa-envelope-open"></i>
</h1>
<h4 class='font-semibold text-lg'>
Enter your email to continue.
</h4>
<h4 class='font-semibold text-md'>
You will receive a magic link to log in.
</h4>
</div>

<%= form_with model: @session, url: send(Passwordless.mounted_as).sign_in_path, class: 'text-center space-y-4' do |f| %>
<div>
<% email_field_name = :"passwordless[#{@email_field}]" %>
<%= text_field_tag email_field_name, params.fetch(email_field_name, nil), required: true %>
<%= text_field_tag email_field_name, params.fetch(email_field_name, nil), required: true, class: 'rounded-md w-full' %>
</div>
<div>
<%= f.submit I18n.t('passwordless.sessions.new.submit') %>
<%= f.submit I18n.t('passwordless.sessions.new.submit'), class: 'cursor-pointer w-full bg-violet-700 hover:bg-violet-900 text-fuchsia-50 p-2 rounded-md font-bold' %>
</div>
<% end %>