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

Add devise #5

Merged
merged 6 commits into from
Oct 6, 2023
Merged

Add devise #5

merged 6 commits into from
Oct 6, 2023

Conversation

Theodoraldo
Copy link
Collaborator

In this PR, I integrated devise for authentication in the project

Project requirements

  • Remove current_user method in ApplicationController, devise will provide us with one.
  • Install and setup devise.
    • Can register a new user.
    • User logs in with a combination of email and password.
    • Hashed password should be stored in the database.
    • Ask for confirmation of email.
    • Can reset password.

Copy link

@rloterh rloterh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sazzad,

You did extremely great on this project! 👏 👏
There are however a few issues that you still need to work on to go to the next project but you are almost there!
🏁 🚦 ⛪ 🚜 🏃 🌴 🏫 🌳 🏘️

Highlights 👍

  • Authentication is coming up well so far, good job!
  • ReadMe looks great!

Required Changes ♻️

Kindly check the inline comments under the review.

Cheers and Happy coding!👏 💻 🍷

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Remember to tag me in your question so I can receive the notification.

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think the code review was unfair, you can request a second opinion using this form.

Comment on lines +2 to +24

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "current-password" %>
</div>

<% if devise_mapping.rememberable? %>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end %>

<div class="actions">
<%= f.submit "Log in" %>
</div>
<% end %>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This activity requires the modification of the views in devise for the registration and login to match the styling of the provided wireframe(s). Kindly ensure that the form (inputs and buttons) stretches across the screen and is centered accordingly for both Login and Signup pages, as seen in the wireframe:
Your Signup view: Your login view: Wireframe login view (Required):
Home Page Home Page Home Page

Comment on lines 4 to 7
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • As part of this activity's requirements, we want a user to be asked for confirmation of email during the registration process, therefore let's ensure to enable the :confirmable option.

Copy link

@prolajumokeoni prolajumokeoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SAZZAD1Q2 and @Theodoraldo

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉

Highlights

  • :confirmable is enabled in user model ✅

Optional suggestions

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.

You can also consider:

  • N/A

Cheers and Happy coding!👏👏👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification @prolajumokeoni.


As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

@SAZZAD1Q2 SAZZAD1Q2 merged commit 97a7d0b into dev Oct 6, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants