Programming Phoenix LiveView: B03 (page 56-57) auth exercise

Dear Sophie.
I tried to do the “Authorization” exercise and have two questions:
-
When trying to plug in an email-service, I found the function “&Routes.user_confirmation_url(conn, :confirm, &1)” in “user_confirmation_controller.ex”.
I wasn’t able to find this function.
Where is it located or how is it created dynamically? -
I added the “username” field without problem, but when I set it to unique and made it safe with “unsafe_validate_unique(:username, Pento.Repo)” some tests failed. I tried to fix them via modifying the fixture()-Function, but still two test concerning the uniqueness of the “email” failed.
Is there an easy way to get the generated tests running, when adding a second unique field?
Thanks for your superb book.
I learned a lot from this exercise, especially the sending of the confirmation-email via Bamboo and Sendgrid.
Best wishes from Heiko
Popular Pragprog topics










Other popular topics










Latest in Pragprog
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /flutter
- /preact
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm