Giter Site home page Giter Site logo

kobaltz / action_auth Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 3.0 149 KB

ActionAuth is an authentication Rails engine crafted to integrate seamlessly with your Rails application. Optimized for Rails 7.1.0, it employs the most modern authentication techniques and streamlined token reset processes.

License: MIT License

Ruby 69.34% JavaScript 3.81% CSS 4.62% HTML 22.23%
authentication rails rails-7-1 ruby-on-rails

action_auth's People

Contributors

jmarsh24 avatar kobaltz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

action_auth's Issues

Custom view violates strong parameters

I set up a custom view for my registration form.

%h2.mt-20.text-lg.font-semibold.text-gray-900 Get started for free
%p.mt-2.text-sm.text-gray-700
  Already registered?
  = link_to "Sign in", sign_in_path, class: "font-medium text-blue-600 hover:underline"
  to your account.
  = form_with(url: sign_up_path, class: "mt-10 grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-2") do |form|
    %div
      = form.label :first_name, class: "mb-3 block text-sm font-medium text-gray-700"
      = form.text_field :first_name, class: "block w-full appearance-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-blue-500 sm:text-sm"
    %div
      = form.label :last_name, class: "mb-3 block text-sm font-medium text-gray-700"
      = form.text_field :last_name, class: "block w-full appearance-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-blue-500 sm:text-sm"
    .col-span-full
      = form.label :email, "Email address", class: "mb-3 block text-sm font-medium text-gray-700"
      = form.email_field :email, class: "block w-full appearance-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-blue-500 sm:text-sm"
    .col-span-full
      = form.label :password, class: "mb-3 block text-sm font-medium text-gray-700"
      = form.password_field :password, class: "block w-full appearance-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-blue-500 sm:text-sm"
    .col-span-full
      = form.label :password_confirmation, class: "mb-3 block text-sm font-medium text-gray-700"
      = form.password_field :password_confirmation, class: "block w-full appearance-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-blue-500 sm:text-sm"
    .col-span-full
      = form.label :traffic_source, "How did you hear about us?", class: "mb-3 block text-sm font-medium text-gray-700"
      = form.select :traffic_source, User.traffic_source_options, {}, {class: "block w-full appearance-none rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-gray-900 placeholder-gray-400 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-blue-500 sm:text-sm pr-8"}
    .col-span-full
      = button_tag type: 'submit', class: "group inline-flex items-center justify-center rounded-full py-2 px-4 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 bg-blue-600 text-white hover:text-slate-100 hover:bg-blue-500 active:bg-blue-800 active:text-blue-100 focus-visible:outline-blue-600 w-full" do
        %span
          Sign up โ†’

You find this in the logs...

Unpermitted parameters: :authenticity_token, :first_name, :last_name, :traffic_source, :button. Context: { controller: ActionAuth::RegistrationsController, action: create, request: #<ActionDispatch::Request:0x0000000127dc14a0>, params: {"authenticity_token"=>"[FILTERED]", "first_name"=>"Charles", "last_name"=>"Wood", "email"=>"[email protected]", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "traffic_source"=>"google", "button"=>"", "controller"=>"action_auth/registrations", "action"=>"create"} }

If I remove the first_name, last_name, and traffic_source fields, I still get unpermitted paramters on authenticity_token and button.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.