Closed demortierch closed 1 month ago
This may be a problem with the generated code. Instead of the "token" query parameter, can you specify the token in the "confirm" query parameter?
It is intentional that the user is logged in immediately. If you don't want unconfirmed users to be able to log in you can implement a plug that redirects them to a page asking them to confirm their email.
I can confirm that it's the query parameter when I'm at a computer in a few hours.
This may be a problem with the generated code. Instead of the "token" query parameter, can you specify the token in the "confirm" query parameter?
It works if the token is passed as 'confirm' parameter in the query.
http://localhost:4000/auth/user/confirm_new_user?confirm=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY3QiOiJjb25maXJtIiwiYXVkIjoifj4gNC4yIiwiZXhwIjoxNzI5OTIxMjc1LCJpYXQiOjE3Mjk2NjIwNzUsImlzcyI6IkFzaEF1dGhlbnRpY2F0aW9uIHY0LjIuMyIsImp0aSI6IjMwMGZzdmh1czFsZm9kaTBybzAwMGFpMSIsIm5iZiI6MTcyOTY2MjA3NSwic3ViIjoidXNlcj9pZD1mNDExMjA5Yi04MzZhLTRlNTEtOWVmZi0yYmFmYjg3YzVkNGIifQ.3LZdHTkiQWrEdSgGWIpOE45qSFOE7XGOyQdTExuI4_s
Awesome, thanks for confirming. I will fix the generator in a few hours so that new projects will use the correct parameter.
It is intentional that the user is logged in immediately. If you don't want unconfirmed users to be able to log in you can implement a plug that redirects them to a page asking them to confirm their email.
Then what's the purpose of confirm_on_create?
? That seems kind of confusing
confirm_on_create
ensures that confirmed_at
is not set to true
, and sends a confirmation email. The confirmation plugin currently only does three things:
confirmed_at
field when confirmation occursWhat it means to be unconfirmed is up to the application currently. @jimsynz might have a better articulated explanation here.
This issue is fixed in the latest release.
In a new project created with igniter, email confirmation seems not working.
Project creation :
Authentication part of user.ex generated by the igniter tasks :
Confirmation link displayed in the console after sign in:
Versions :