antalvarenga

antalvarenga

I’m rather new to the programming world, and I’ve searched for this for a while and haven’t found a solution yet.
Question is - How to do an email check/confirmation/validation with Phoenix? I was looking for something like sending a link to the email for confirmation, because it seems that that’s the way it’s done by virtually all websites/companies.

Showing Posts 1 to 10

christopheradams

christopheradams

Have you looked at the Coherence package? It has a Confirmable module that is designed to confirm email addresses.

antalvarenga

antalvarenga OP

Haven’t come across it, no. I’ll check it out. Thanks!

OvermindDL1

OvermindDL1

Coherence is a full login library, you’d probably want something like just a mailer like mailer or any of the others or so.

antalvarenga

antalvarenga OP

Yeah I was struggling a bit… I have a basic login and it works well, so I’m thinking of adding the missing bits instead of throwing it all out and go with a full library.

idi527

idi527

I’ve used bamboo [0] with mailgun and it worked well for me. There are a few tutorials about it [1][2], it integrates well into phoenix and has pretty good docs.

[0] bamboo | Hex
[1] https://thoughtbot.com/upcase/videos/elixir-and-phoenix-in-production
[2] Sending Email via SMTP with Elixir Phoenix – lpil.uk

voger

voger

openmaize is a simple enough library to understand it’s working. @riverrun has also made an [example application] (https://github.com/riverrun/openmaize-phoenix-example) to showcase it’s usage.

If you plan to DIY you will find a lot of inspiration in those two repos.

JeyHey

JeyHey

I used gen_smtp with a sengrid-account.

bobbypriambodo

bobbypriambodo

Just want to add, because you said that you are rather new to the programming world…

The basic flow of confirming email address is as follows:

  1. User registered into your app

  2. Your app inserts the user into the DB (perhaps table accounts or something) with a verified field set to false or 0

  3. Your app generates a verify token (usually some random string), and

  • inserts it into a database (another table, such as verify_tokens) and the associated user ID

  • constructs a verify link with the token and send it to the user (might also want to include the user ID in it)

  1. The user receives the email and clicks on the link

  2. In the handler, your app will:

  • check the request params and look up for a verify token belonging to the user ID in the DB and

  • if found, update the verified field of your user on table accounts

I hope that makes sense!

12
Post #8
papakay

papakay

I will recommend email_checker. It’s quite straightforward to use.

NobbZ

NobbZ

That one is very hard to proof… Double-Opt-In does only prrof that the person registering also has at least reading access to the given email account.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews