repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/registrations_controller.rb
app/controllers/action_auth/registrations_controller.rb
module ActionAuth class RegistrationsController < ApplicationController before_action :validate_pwned_password, only: :create rate_limit to: 3, within: 60.seconds, only: :create, name: "registration-throttle", with: -> { redirect_to new_user_registration_path, alert: "Too many registr...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/sessions_controller.rb
app/controllers/action_auth/sessions_controller.rb
module ActionAuth class SessionsController < ApplicationController before_action :set_current_request_details before_action :authenticate_user!, only: [:index, :destroy] rate_limit to: 5, within: 20.seconds, only: :create, name: "slow-throttle", with: -> { redirect_to sign_in_path...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/application_controller.rb
app/controllers/action_auth/application_controller.rb
module ActionAuth class ApplicationController < ActionController::Base end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/magics/requests_controller.rb
app/controllers/action_auth/magics/requests_controller.rb
module ActionAuth class Magics::RequestsController < ApplicationController def new end def create user = User.find_or_initialize_by(email: params[:email]) if user.new_record? password = SecureRandom.hex(32) user.password = password user.password_confirmation = password...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/magics/sign_ins_controller.rb
app/controllers/action_auth/magics/sign_ins_controller.rb
module ActionAuth class Magics::SignInsController < ApplicationController def show user = ActionAuth::User.find_by_token_for(:magic_token, params[:token]) if user @session = user.sessions.create cookies.signed.permanent[:session_token] = { value: @session.id, httponly: true } u...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/sms_auths/requests_controller.rb
app/controllers/action_auth/sms_auths/requests_controller.rb
module ActionAuth class SmsAuths::RequestsController < ApplicationController def new end def create @user = User.find_or_initialize_by(phone_number: params[:phone_number]) if @user.new_record? password = SecureRandom.hex(32) @user.email = "#{SecureRandom.hex(32)}@smsauth" ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/sms_auths/sign_ins_controller.rb
app/controllers/action_auth/sms_auths/sign_ins_controller.rb
module ActionAuth class SmsAuths::SignInsController < ApplicationController def show @user = ActionAuth::User.find_by(phone_number: params[:phone_number]) end def create user = ActionAuth::User.find_by( phone_number: cookies.signed[:sms_auth_phone_number], sms_code: params[:sm...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/sessions/passkeys_controller.rb
app/controllers/action_auth/sessions/passkeys_controller.rb
module ActionAuth module Sessions class PasskeysController < ApplicationController def new get_options = WebAuthn::Credential.options_for_get session[:current_challenge] = get_options.challenge @options = get_options end def create webauthn_credential = WebAuthn:...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/identity/emails_controller.rb
app/controllers/action_auth/identity/emails_controller.rb
module ActionAuth module Identity class EmailsController < ApplicationController before_action :set_user def edit end def update if @user.update(user_params) redirect_to_root else render :edit, status: :unprocessable_entity end end ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/identity/email_verifications_controller.rb
app/controllers/action_auth/identity/email_verifications_controller.rb
module ActionAuth module Identity class EmailVerificationsController < ApplicationController before_action :set_user, only: :show def show @user.update! verified: true redirect_to sign_in_path, notice: "Thank you for verifying your email address" end def create us...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/controllers/action_auth/identity/password_resets_controller.rb
app/controllers/action_auth/identity/password_resets_controller.rb
module ActionAuth module Identity class PasswordResetsController < ApplicationController before_action :set_user, only: %i[ edit update ] before_action :validate_pwned_password, only: :update def new end def edit end def create if @user = ActionAuth::User.find_...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/models/action_auth/current.rb
app/models/action_auth/current.rb
module ActionAuth class Current < ActiveSupport::CurrentAttributes attribute :session attribute :user_agent, :ip_address delegate :user, to: :session, allow_nil: true end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/models/action_auth/session.rb
app/models/action_auth/session.rb
module ActionAuth class Session < ApplicationRecord self.table_name = "sessions" belongs_to :user, class_name: "ActionAuth::User", foreign_key: "user_id" before_create do self.user_agent = Current.user_agent self.ip_address = Current.ip_address end end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/models/action_auth/application_record.rb
app/models/action_auth/application_record.rb
module ActionAuth class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/models/action_auth/webauthn_credential.rb
app/models/action_auth/webauthn_credential.rb
module ActionAuth class WebauthnCredential < ApplicationRecord self.table_name = "webauthn_credentials" validates :external_id, :public_key, :nickname, :sign_count, presence: true validates :external_id, uniqueness: true validates :sign_count, numericality: { only_intege...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/models/action_auth/user.rb
app/models/action_auth/user.rb
module ActionAuth class User < ApplicationRecord self.table_name = "users" has_secure_password has_many :sessions, dependent: :destroy, class_name: "ActionAuth::Session", foreign_key: "user_id" if ActionAuth.configuration.webauthn_enabled? has_many :webauthn_credentials, dependent: :des...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/mailers/action_auth/application_mailer.rb
app/mailers/action_auth/application_mailer.rb
module ActionAuth class ApplicationMailer < ActionMailer::Base default from: ActionAuth.configuration.default_from_email layout "mailer" end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/app/mailers/action_auth/user_mailer.rb
app/mailers/action_auth/user_mailer.rb
module ActionAuth class UserMailer < ApplicationMailer def password_reset @user = params[:user] @signed_id = @user.generate_token_for(:password_reset) mail to: @user.email, subject: "Reset your password" end def email_verification @user = params[:user] @signed_id = @user.ge...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/db/migrate/20231107170349_create_action_auth_sessions.rb
db/migrate/20231107170349_create_action_auth_sessions.rb
class CreateActionAuthSessions < ActiveRecord::Migration[7.1] def change create_table :sessions do |t| t.references :user, null: false, foreign_key: true t.string :user_agent t.string :ip_address t.timestamps end end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/db/migrate/20240818032321_add_type_to_webauthn_credentials.rb
db/migrate/20240818032321_add_type_to_webauthn_credentials.rb
class AddTypeToWebauthnCredentials < ActiveRecord::Migration[7.2] def change add_column :webauthn_credentials, :key_type, :integer, default: 0, limit: 2 end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/db/migrate/20240111125859_add_webauthn_credentials.rb
db/migrate/20240111125859_add_webauthn_credentials.rb
class AddWebauthnCredentials < ActiveRecord::Migration[7.1] def change create_table :webauthn_credentials do |t| t.string :external_id, null: false t.string :public_key, null: false t.string :nickname, null: false t.bigint :sign_count, null: false, default: 0 t.index :external_id, u...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/db/migrate/20231107165548_create_action_auth_users.rb
db/migrate/20231107165548_create_action_auth_users.rb
class CreateActionAuthUsers < ActiveRecord::Migration[7.1] def change create_table :users do |t| t.string :email t.string :password_digest t.boolean :verified t.timestamps end add_index :users, :email, unique: true end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/db/migrate/20240111142545_add_webauthn_id_to_users.rb
db/migrate/20240111142545_add_webauthn_id_to_users.rb
class AddWebauthnIdToUsers < ActiveRecord::Migration[7.1] def change add_column :users, :webauthn_id, :string end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/db/migrate/20241020172209_add_phone_number_to_users.rb
db/migrate/20241020172209_add_phone_number_to_users.rb
class AddPhoneNumberToUsers < ActiveRecord::Migration[7.2] def change add_column :users, :phone_number, :string add_column :users, :sms_code, :string add_column :users, :sms_code_sent_at, :datetime end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/action_auth_test.rb
test/action_auth_test.rb
require 'test_helper' # Test Engine isolation class EngineIsolationTest < ActiveSupport::TestCase test "engine is isolated" do assert ActionAuth::Engine.isolated? end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/test_helper.rb
test/test_helper.rb
# Configure Rails Environment ENV["RAILS_ENV"] = "test" require 'simplecov' SimpleCov.start "rails" do add_filter '/test/' end require_relative "../test/dummy/config/environment" ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)] ActiveRecord::Migrator.migrations_paths...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/support/sign_in_as_helper.rb
test/support/sign_in_as_helper.rb
module SignInAsHelper def sign_in_as(user) session = user.sessions.create signed_cookies = ActionDispatch::Request.new(Rails.application.env_config.deep_dup).cookie_jar signed_cookies.signed[:session_token] = { value: session.id, httponly: true } cookies[:session_token] = signed_cookies[:session_token...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/integration/navigation_test.rb
test/integration/navigation_test.rb
require "test_helper" class NavigationTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/sessions_controller_test.rb
test/controllers/action_auth/sessions_controller_test.rb
require "test_helper" module ActionAuth class SessionsControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers setup do @user = action_auth_users(:one) end test "should get index" do sign_in_as(@user) get sessions_url assert_response :success en...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/webauthn_credentials_controller_test.rb
test/controllers/action_auth/webauthn_credentials_controller_test.rb
require 'test_helper' require "webauthn/fake_client" class WebauthnCredentialsControllerTest < ActionDispatch::IntegrationTest setup do @user = action_auth_users(:one) end test 'new should require authentication' do get action_auth.new_webauthn_credential_path assert_redirected_to action_auth.sign_i...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/webauthn_credential_authentications_controller_test.rb
test/controllers/action_auth/webauthn_credential_authentications_controller_test.rb
require "test_helper" class ActionAuth::WebauthnCredentialAuthenticationsControllerTest < ActionDispatch::IntegrationTest include ActionAuth::Engine.routes.url_helpers test "should implement rate limiting for WebAuthn authentication" do controller = ActionAuth::WebauthnCredentialAuthenticationsController.new ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/registrations_controller_test.rb
test/controllers/action_auth/registrations_controller_test.rb
require "test_helper" module ActionAuth class RegistrationsControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers test "should get new" do get sign_up_path assert_response :success end test "should sign up" do assert_difference("ActionAuth::User.count")...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/webauthn_credential_authentication_controllers_test.rb
test/controllers/action_auth/webauthn_credential_authentication_controllers_test.rb
require 'test_helper' require "webauthn/fake_client" module ActionAuth class WebauthnCredentialAuthenticationsControllerTest < ActionDispatch::IntegrationTest setup do @user = action_auth_users(:one) end test 'new should require initiated login and 2FA enabled' do get action_auth.new_webauth...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/users_controller_test.rb
test/controllers/action_auth/users_controller_test.rb
require "test_helper" module ActionAuth class UsersControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers setup do @user = sign_in_as(action_auth_users(:one)) end test "destroys user" do assert_difference("User.count", -1) do delete users_url(@user) ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/passwords_controller_test.rb
test/controllers/action_auth/passwords_controller_test.rb
require "test_helper" module ActionAuth class PasswordsControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers setup do @user = sign_in_as(action_auth_users(:one)) end test "should get edit" do get edit_password_path assert_response :success end ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/magics/sign_ins_controller_test.rb
test/controllers/action_auth/magics/sign_ins_controller_test.rb
require "test_helper" module ActionAuth class Magics::SignInsControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers test "should sign in user with valid token" do user = action_auth_users(:one) valid_token = user.generate_token_for(:magic_token) assert_differenc...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/magics/requests_controller_test.rb
test/controllers/action_auth/magics/requests_controller_test.rb
require "test_helper" module ActionAuth class Magics::RequestsControllerTest < ActionDispatch::IntegrationTest include Engine.routes.url_helpers test "should get new" do get new_magics_requests_path assert_response :success end # Test the 'create' action test "should create user and...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/sms_auths/sign_ins_controller_test.rb
test/controllers/action_auth/sms_auths/sign_ins_controller_test.rb
require 'test_helper' class ActionAuth::SmsAuths::SignInsControllerTest < ActionDispatch::IntegrationTest include ActionAuth::Engine.routes.url_helpers def setup @user = action_auth_users(:one) @user.update(phone_number: '1234567890', sms_code: '123456', sms_code_sent_at: 2.minutes.ago) @signed_cookie...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/sms_auths/requests_controller_test.rb
test/controllers/action_auth/sms_auths/requests_controller_test.rb
require 'test_helper' class ActionAuth::SmsAuths::RequestsControllerTest < ActionDispatch::IntegrationTest include ActionAuth::Engine.routes.url_helpers def setup assert ActionAuth.configuration.sms_auth_enabled? @existing_user = action_auth_users(:one) @existing_user.update(phone_number: '+1123456789...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/identity/password_resets_controller_test.rb
test/controllers/action_auth/identity/password_resets_controller_test.rb
require "test_helper" class ActionAuth::Identity::PasswordResetsControllerTest < ActionDispatch::IntegrationTest include ActionAuth::Engine.routes.url_helpers setup do @user = action_auth_users(:one) end test "should get new" do get new_identity_password_reset_url assert_response :success end ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/identity/emails_controller_test.rb
test/controllers/action_auth/identity/emails_controller_test.rb
require "test_helper" class ActionAuth::Identity::EmailsControllerTest < ActionDispatch::IntegrationTest include ActionAuth::Engine.routes.url_helpers setup do @user = action_auth_users(:one) sign_in_as(@user) end test "should get edit" do get edit_identity_email_url assert_response :success ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/controllers/action_auth/identity/email_verifications_controller_test.rb
test/controllers/action_auth/identity/email_verifications_controller_test.rb
require "test_helper" class ActionAuth::Identity::EmailVerificationsControllerTest < ActionDispatch::IntegrationTest include ActionAuth::Engine.routes.url_helpers setup do @user = action_auth_users(:one) sign_in_as(@user) @user.update!(verified: false) end test "should send a verification email" ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/models/action_auth/session_test.rb
test/models/action_auth/session_test.rb
require "test_helper" module ActionAuth class SessionTest < ActiveSupport::TestCase def setup @user = action_auth_users(:one) end test "should belong to user" do session = @user.sessions.new assert_respond_to session, :user end test "should set user_agent and ip_address before...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/models/action_auth/user_test.rb
test/models/action_auth/user_test.rb
require "test_helper" module ActionAuth class UserTest < ActiveSupport::TestCase def setup @user = ActionAuth::User.new(email: "test@example.com", password: "123456789012") end test "should be valid" do assert @user.valid? end test "email should be present" do @user.email = " ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/jobs/application_job.rb
test/dummy/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base # Automatically retry jobs that encountered a deadlock # retry_on ActiveRecord::Deadlocked # Most jobs are safe to ignore if the underlying records are no longer available # discard_on ActiveJob::DeserializationError end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/helpers/posts_helper.rb
test/dummy/app/helpers/posts_helper.rb
module PostsHelper end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/helpers/application_helper.rb
test/dummy/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/helpers/welcome_helper.rb
test/dummy/app/helpers/welcome_helper.rb
module WelcomeHelper end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/controllers/posts_controller.rb
test/dummy/app/controllers/posts_controller.rb
class PostsController < ApplicationController before_action :set_post, only: %i[ show edit update destroy ] # GET /posts def index @posts = Post.all end # GET /posts/1 def show end # GET /posts/new def new @post = Current.user.posts.new end # GET /posts/1/edit def edit end # POS...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/controllers/welcome_controller.rb
test/dummy/app/controllers/welcome_controller.rb
class WelcomeController < ApplicationController def index end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/controllers/application_controller.rb
test/dummy/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/models/current.rb
test/dummy/app/models/current.rb
class Current < ActiveSupport::CurrentAttributes def user return unless ActionAuth::Current.user ActionAuth::Current.user.becomes(User) end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/models/sms_sender.rb
test/dummy/app/models/sms_sender.rb
require 'twilio-ruby' class SmsSender def self.send_code(phone_number, code) client = Twilio::REST::Client.new( ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN'] ) client.messages.create( from: ENV['TWILIO_PHONE_NUMBER'], to: phone_number, body: "Your verification code is...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/models/post.rb
test/dummy/app/models/post.rb
class Post < ApplicationRecord belongs_to :user end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/models/application_record.rb
test/dummy/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base primary_abstract_class end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/models/user.rb
test/dummy/app/models/user.rb
class User < ActionAuth::User has_many :posts, dependent: :destroy end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/mailers/application_mailer.rb
test/dummy/app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base default from: "from@example.com" layout "mailer" end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/channels/application_cable/channel.rb
test/dummy/app/channels/application_cable/channel.rb
module ApplicationCable class Channel < ActionCable::Channel::Base end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/app/channels/application_cable/connection.rb
test/dummy/app/channels/application_cable/connection.rb
module ApplicationCable class Connection < ActionCable::Connection::Base end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/db/schema.rb
test/dummy/db/schema.rb
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/db/migrate/20240114051355_create_posts.rb
test/dummy/db/migrate/20240114051355_create_posts.rb
class CreatePosts < ActiveRecord::Migration[7.1] def change create_table :posts do |t| t.belongs_to :user, null: false, foreign_key: true t.string :title t.timestamps end end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/test/system/posts_test.rb
test/dummy/test/system/posts_test.rb
require "application_system_test_case" class PostsTest < ApplicationSystemTestCase setup do @post = posts(:one) end test "visiting the index" do visit posts_url assert_selector "h1", text: "Posts" end test "should create post" do visit posts_url click_on "New post" fill_in "Title",...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/test/controllers/posts_controller_test.rb
test/dummy/test/controllers/posts_controller_test.rb
require "test_helper" class PostsControllerTest < ActionDispatch::IntegrationTest setup do @post = posts(:one) end test "should get index" do get posts_url assert_response :success end test "should get new" do get new_post_url assert_response :success end test "should create post" ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/test/controllers/welcome_controller_test.rb
test/dummy/test/controllers/welcome_controller_test.rb
require "test_helper" class WelcomeControllerTest < ActionDispatch::IntegrationTest test "should get index" do get welcome_index_url assert_response :success end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/test/models/post_test.rb
test/dummy/test/models/post_test.rb
require "test_helper" class PostTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/application.rb
test/dummy/config/application.rb
require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Dummy class Application < Rails::Application config.load_defaults Rails::VERSION::STRING.to_f # For compatibil...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/environment.rb
test/dummy/config/environment.rb
# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/puma.rb
test/dummy/config/puma.rb
# This configuration file will be evaluated by Puma. The top-level methods that # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. # Puma can serve each request in a thread from an internal thread pool. # The `threa...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/routes.rb
test/dummy/config/routes.rb
Rails.application.routes.draw do resources :posts mount ActionAuth::Engine => 'action_auth' root 'welcome#index' end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/boot.rb
test/dummy/config/boot.rb
# Set up gems listed in the Gemfile. ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__) require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/initializers/content_security_policy.rb
test/dummy/config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy. # See the Securing Rails Applications Guide for more information: # https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/initializers/filter_parameter_logging.rb
test/dummy/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behavio...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/initializers/action_auth.rb
test/dummy/config/initializers/action_auth.rb
ActionAuth.configure do |config| config.allow_user_deletion = true config.default_from_email = "from@example.com" config.magic_link_enabled = true config.passkey_only = true # Allows sign in with only a passkey config.pwned_enabled = true # defined?(Pwned) config.sms_auth_enabled = true config.verify_emai...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/initializers/inflections.rb
test/dummy/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/initializers/permissions_policy.rb
test/dummy/config/initializers/permissions_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide HTTP permissions policy. For further # information see: https://developers.google.com/web/updates/2018/06/feature-policy # Rails.application.config.permissions_policy do |policy| # policy.camera :none # policy.gyroscope ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/initializers/assets.rb
test/dummy/config/initializers/assets.rb
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/environments/test.rb
test/dummy/config/environments/test.rb
require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data the...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/environments/development.rb
test/dummy/config/environments/development.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for developme...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/dummy/config/environments/production.rb
test/dummy/config/environments/production.rb
require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your app...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/lib/action_auth/version_test.rb
test/lib/action_auth/version_test.rb
require "test_helper" module ActionAuth class VersionTest < ActiveSupport::TestCase test "should be valid" do refute_nil ::ActionAuth::VERSION end end end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/lib/action_auth/configuration_test.rb
test/lib/action_auth/configuration_test.rb
require 'test_helper' module ActionAuth class ConfigurationTest < ActiveSupport::TestCase def setup @config = Configuration.new end test 'should initialize with default values' do assert_equal defined?(WebAuthn), @config.webauthn_enabled assert_equal 'http://localhost:3000', @config.we...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/lib/action_auth/controllers/helpers_test.rb
test/lib/action_auth/controllers/helpers_test.rb
require 'test_helper' class MockController < ActionController::Base include ActionAuth::Controllers::Helpers end class ActionAuth::Controllers::HelpersTest < ActionDispatch::IntegrationTest setup do @controller = MockController.new @session = action_auth_sessions(:one) @user = action_auth_users(:one) ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/mailers/action_auth/user_mailer_test.rb
test/mailers/action_auth/user_mailer_test.rb
require "test_helper" module ActionAuth class UserMailerTest < ActionMailer::TestCase setup do @user = action_auth_users(:one) end test "password_reset" do mail = ActionAuth::UserMailer.with(user: @user).password_reset assert_equal "Reset your password", mail.subject assert_equal...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/test/mailers/previews/action_auth/user_mailer_preview.rb
test/mailers/previews/action_auth/user_mailer_preview.rb
module ActionAuth # Preview all emails at http://localhost:3000/rails/mailers/user_mailer class UserMailerPreview < ActionMailer::Preview # Preview this email at http://localhost:3000/rails/mailers/user_mailer/email_verification def email_verification user = User.create(email: "john.smith@example.com...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/lib/action_auth.rb
lib/action_auth.rb
require "action_auth/version" require "action_auth/engine" require "action_auth/configuration" module ActionAuth class << self attr_writer :configuration def configuration @configuration ||= Configuration.new end def configure yield(configuration) if block_given? configure_webauth...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/lib/action_auth/version.rb
lib/action_auth/version.rb
module ActionAuth VERSION = "1.8.7" end
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/lib/action_auth/configuration.rb
lib/action_auth/configuration.rb
module ActionAuth class Configuration attr_accessor :allow_user_deletion attr_accessor :default_from_email attr_accessor :magic_link_enabled attr_accessor :passkey_only attr_accessor :pwned_enabled attr_accessor :sms_auth_enabled attr_accessor :sms_send_class attr_accessor :verify_ema...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/lib/action_auth/engine.rb
lib/action_auth/engine.rb
require 'action_auth/controllers/helpers' require 'action_auth/routing/helpers' module ActionAuth class Engine < ::Rails::Engine isolate_namespace ActionAuth ActiveSupport.on_load(:action_controller_base) do include ActionAuth::Controllers::Helpers include ActionAuth::Routing::Helpers end ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/lib/action_auth/routing/helpers.rb
lib/action_auth/routing/helpers.rb
module ActionAuth module Routing module Helpers def user_sessions_path action_auth.sessions_path end def user_session_path(session_id) action_auth.session_path(session_id) end def new_user_session_path action_auth.sign_in_path end def new_user_r...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/lib/action_auth/controllers/helpers.rb
lib/action_auth/controllers/helpers.rb
module ActionAuth module Controllers module Helpers extend ActiveSupport::Concern included do before_action :set_current_request_details before_action :check_session_timeout def current_user; Current.user; end helper_method :current_user def current_session; ...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
kobaltz/action_auth
https://github.com/kobaltz/action_auth/blob/b43f513090a1188e3f8f400ba4317c9b96c99181/config/routes.rb
config/routes.rb
ActionAuth::Engine.routes.draw do get "sign_in", to: "sessions#new" post "sign_in", to: "sessions#create" get "sign_up", to: "registrations#new" post "sign_up", to: "registrations#create" namespace :identity do resource :email, only: [:edit, :update] resource :email_verification, only:...
ruby
MIT
b43f513090a1188e3f8f400ba4317c9b96c99181
2026-01-04T17:52:32.033910Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/mint-exporter.rb
mint-exporter.rb
require 'mint' Mint.configure do |config| config.username = ENV.fetch('MINT_USERNAME') config.password = ENV.fetch('MINT_PASSWORD') end client = Mint::Client.new puts client.transactions.fetch
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/spec/spec_helper.rb
spec/spec_helper.rb
require 'mint' require 'vcr' require 'webmock' VCR.configure do |config| config.cassette_library_dir = 'spec/cassettes' config.hook_into :webmock config.configure_rspec_metadata! end
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/spec/lib/mint_spec.rb
spec/lib/mint_spec.rb
require 'spec_helper' describe Mint do describe '.configure' do let(:username) { 'test@example.org' } let(:password) { '123456' } it 'assigns username' do Mint.configure { |config| config.username = username } expect(Mint.config.username).to eq(username) end it 'assigns password' d...
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/spec/lib/mint/client_spec.rb
spec/lib/mint/client_spec.rb
require 'spec_helper' require 'csv' describe Mint::Client do describe '#transaction', vcr: {match_requests_on: %i(method uri body headers)} do before do Mint.configure do |config| config.username = 'test@example.org' config.password = '123456' end end let(:client) { Mint::Cli...
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/spec/lib/mint/session_spec.rb
spec/lib/mint/session_spec.rb
require 'spec_helper' describe Mint::Session do describe '#create!' do let(:session) { Mint::Session.new } context 'error in response' do let(:response) { '{"error": {"the_system": "is_down"}}' } before { allow(session).to receive(:request).and_return(response) } it 'raises an exception'...
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/lib/mint.rb
lib/mint.rb
require 'dotenv' require 'rest-client' require 'wait' Dotenv.load require_relative 'mint/config' module Mint URL = 'https://wwws.mint.com' class << self; attr_reader :config; end @config = Mint::Config.new def self.configure yield(config) end end require_relative 'mint/client' require_relative 'mint...
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/lib/mint/session.rb
lib/mint/session.rb
module Mint class Session URL = "#{Mint::URL}/loginUserSubmit.xevent" def create! response = request error = JSON.parse(response)['error'] raise(error.to_s) if error @cookies = response.cookies end def params {cookies: cookies} end private attr_reader ...
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/lib/mint/transaction.rb
lib/mint/transaction.rb
module Mint class Transaction URL = "#{Mint::URL}/transactionDownload.event" attr_reader :session def initialize(session) @session = session end def fetch request_until_valid end private # A workaround for this bug: # https://github.com/toddmazierski/mint-exp...
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false
toddmazierski/mint-exporter
https://github.com/toddmazierski/mint-exporter/blob/443976130010255d3259817affb2e38b320aa0bf/lib/mint/client.rb
lib/mint/client.rb
module Mint class Client def transactions Mint::Transaction.new(session) end private def session @session ||= Mint::Session.new.tap(&:create!) end end end
ruby
MIT
443976130010255d3259817affb2e38b320aa0bf
2026-01-04T17:52:31.479208Z
false