Skip to content

Commit

Permalink
fix cops
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Apr 3, 2024
1 parent da6ddb7 commit 875a6db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/authtown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require "authtown/builder"
require "authtown/view_mixin"

# rubocop:disable Layout/LineLength
### Simple migration strategy:
#
# Sequel.migration do
Expand Down Expand Up @@ -35,12 +36,13 @@
# end
# end
# end
# rubocop:enable Layout/LineLength

Thread.attr_accessor :authtown_state
class Authtown::Current
class << self
def thread_state = Thread.current.authtown_state ||= {}

def user=(new_user)
thread_state[:user] = new_user
end
Expand All @@ -56,7 +58,7 @@ def user = thread_state[:user]
config,
rodauth_config: nil,
account_landing_page: "/account/profile",
user_class_resolver: ->{ User }
user_class_resolver: -> { User }
|

config.authtown ||= {}
Expand All @@ -73,7 +75,6 @@ def user = thread_state[:user]
app.plugin(:sessions, secret:)

app.plugin :rodauth do

enable :login, :logout, :create_account, :remember, :reset_password, :internal_request
hmac_secret secret

Expand Down

0 comments on commit 875a6db

Please sign in to comment.