authcrunch / authcrunch.github.io

Documentation for Caddy v2 Auth Portal and Authorize Plugins.
77 stars 32 forks source link

Unable to register new user without email verification. #48

Closed phanos-engineer closed 1 year ago

phanos-engineer commented 1 year ago

Using localdb, I am unable to create a new user.

I don't have a smtp server and I don't one either.

How do I register users without using email smtp?

        messaging email provider localhost-smtp-server {
            address 127.0.0.1:1025
            protocol smtp
            passwordless
            sender root@localhost "My Auth Portal"
            # credentials root@localhost
            bcc greenpau@localhost
        }
        user registration localdbRegistry {
            dropbox /caddy/localtest/registrations.json
            title "User Registration"
            code "GRITT4Life"
            require accept terms
            #require domain mx
            admin email admin@localhost
            email provider localhost-smtp-server
            identity store localdb
        }

The error message is

WARN    security    Failed to send notification {"session_id": "qeu3ododd3wnyepY8SFNvk6FT4mJFspgxkk5b", "request_id": "986862ab-5b6a-46dd-a9de-a08dfe7fa60e", "registration_id": "JARaZJLRxxwfUpW6D1hVbv7KsTRJgrdmCMiRh2WujzqCRLLgDNrX75LGjifH5RildDAKKvgp3UbrJqGBkckj1tF6N", "registration_type": "registration_confirmation", "error": "notification request via \"localhost-smtp-server\" email provider failed: dial tcp 127.0.0.1:1025: connect: connection refused"}

WARN    security    failed registration {"session_id": "qeu3ododd3wnyepY8SFvk6FT4mJFspgxkk5b", "request_id": "986862ab-5b6a-46dd-a9de-a08dfe7fa60e", "src_ip": "127.0.0.1", "src_conn_ip": "127.0.0.1", "error": "Internal registration messaging error"}

Note: I did try commenting out the email provider... but that resulted in a run error

greenpau commented 1 year ago

@phanos-engineer , see https://github.com/authp/authp.github.io/issues/20 on how to create users via config file.

phanos-engineer commented 1 year ago

Thank you for your quick feedback. But I don't think you understood my question.

I know that I can create users via config file. My question is about allowing users to register without email verification.

There are too many users for me to include manually in a config file. Also, I am operating in a closed system and have no need for the email verification.

greenpau commented 1 year ago

Thank you for your quick feedback. But I don't think you understood my question.

Yes, misunderstood.

There are too many users for me to include manually in a config file. Also, I am operating in a closed system and have no need for the email verification.

@phanos-engineer , in that case you can build your own script to add users to users.json.