Phx.gen.auth - using 6-digit code instead of a link to confirm user account


I’ve used phx.gen.auth for my auth system and by default, when a user creates an account, they get an email with confirmation link which they have to click to confirm the account. I would like to send user a 6-digit code which they have to insert into the form on the website instead of a link they have to click. Can anyone share their advice on how to properly do this?