Replies: 2 comments 2 replies
-
Note that you problem don't want to use module Rodauth
def self.lib(opts={}, &block)
require 'roda'
c = Class.new(Roda)
c.plugin(:rodauth, opts) do
enable :internal_request
instance_exec(&block)
end
c.freeze
c.rodauth
end
end |
Beta Was this translation helpful? Give feedback.
-
This is expected. I assume you used the Rodauth
Great! |
Beta Was this translation helpful? Give feedback.
-
I am struggling to get Rodauth working with Postgres and a separate password user (referred to as ph in the documentation).
The error I am encountering when attempting to create a new user is:
This happens when using the create_account plugin but I can reproduce it as follows:
I can see that functions have been created in the Postgres database (rodauth_valid_password_hash, rodauth_get_salt, etc) but my suspicion is that I have not correctly configured Rodauth to use a separate ph user and custom schemas. The section of the README that is unclear to me is this one:
I added some debugging output to the block that is passed to function_name and it appears to never get called.
I have added these sections in the following location in demo app:
I have also logged the following SQL from the create_account method:
I have looked around at the example Rodauth sites on Github but I have not found an example that uses separate Postgres users. I would be very grateful if anyone could point out the error of my ways or point me to an example project that uses a separate Postgres ph user and a non-default schema!
I must add that everything works fine with the default schema. This only happens when using a non-default schema.
Beta Was this translation helpful? Give feedback.
All reactions