-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Bypass/disable email verification #569
Comments
Did you ever find a solution to this? I don't want to set up an smtp relay just for this container |
This is dependent on whether you can access the repl in your VM If you can, then it's possible to send commands to your DB, yes |
I have full access to the underlying files and database, but I am struggling to edit the database. Do you know how I could simply edit it to believe my user is verified? |
You have to have a repl connection to the db, and do something like this |
If someone would be so kind, could you explain how to do this? I have orcpub running in a docker-compose stack |
If I remember correctly getting a proper replacement connection through docker is a nightmare... If you're able to, it's much easier to run the project bare on a PC so you can interact directly with it. You'll need JRE8 and use our copy of the "free" (discontinued) datomic because new versions don't run on windows; via a bug they haven't bothered to fix. We really should move the docker instructions from the top of the README. Or finagle an admin panel in to just boop these problems away |
FYI: This is what worked for me to manually verify a user. (I can't get the email to work for some reason) Complete Instructions for Verifying a User in Datomic1. Connect to Datomic Container# Connect to the Datomic container bash shell
docker exec -it <container_name> bash
# If you don't know the container name, find it with
docker ps 2. Start the REPL# Navigate to the application directory if needed
cd /path/to/app
# Start the Clojure REPL
./bin/repl 3. Connect to Datomic and Verify the UserOnce the REPL is running, enter these commands: ;; Import the Datomic API
(require '[datomic.api :as d])
;; Connect to the database
(def conn (d/connect "datomic:free://datomic:4334/orcpub?password=[password]"))
;; Get the current database value
(def db (d/db conn))
;; Define a function to verify a user
(defn manual-verify-user [email-or-username]
(let [user-eid (ffirst (d/q '[:find ?e
:in $ ?email-or-username
:where
(or [?e :orcpub.user/email ?email-or-username]
[?e :orcpub.user/username ?email-or-username])]
db email-or-username))]
(if user-eid
(let [verification-key (d/q '[:find ?key .
:in $ ?e
:where [?e :orcpub.user/verification-key ?key]]
db user-eid)]
(if verification-key
(do
(println "Found verification key:" verification-key)
(d/transact conn [{:db/id user-eid
:orcpub.user/verified? true}]))
(println "No verification key found for user")))
(println "User not found"))))
;; Verify a user by providing their email or username
(manual-verify-user "[email protected]")
;; Optionally, verify the change was applied
(d/q '[:find ?verified .
:in $ ?email
:where
[?e :orcpub.user/email ?email]
[?e :orcpub.user/verified? ?verified]]
(d/db conn) "[email protected]") 4. Exit the REPLWhen you're done, exit the REPL: ;; Press Ctrl+D or type:
:quit Then exit the container shell: exit These instructions should work whenever you need to manually verify a user in your Datomic database. |
Motivation / Use Case
I find using any online version to be laggy unenjoyable, I'd like to run a stand-alone in VM but the email verification adds complexity in the setup that is undesirable
Expected Behavior
Bypass/disable email verification for account creation
Other Information
Perhaps this is possible already? are there instructions on how one can inject an authorized user?
The text was updated successfully, but these errors were encountered: