I'm having issues understanding how the Strapi email confirmation is supposed to work. I get this: http://0.0.0.0/auth/emailconfirmation?confirmation=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
eStrapi has a built in email plugin that handles that, you can also add third party email providers.
The way it works is that Strapi sends a email with a link that has a hash attached to it. When you click it, it will go to SERVER host with a specific endpoint in the URL and the server will automatically validate your email. There are some steps to have to follow:
module.exports = ({ env }) => ({
host: env('HOST'),
port: env.int('PORT'),
url: env('BACKEND_URL'),
});
module.exports = ({ env }) => ({
host: env('HOST'),
port: env.int('PORT'),
url: env('BACKEND_URL_LOCAL'),
});
inside your .env variables add your server url's for hosted and local, Make sure you set your NODE_ENV for the proper environments:
BACKEND_URL=https://my-app.herokuapp.com
BACKEND_URL_LOCAL=http://localhost:1337
# NODE_ENV=production
NODE_ENV=development
test both your served backend as well as the local. Your full url string should look something like this:
local -> http://localhost:1337/api/auth/email-confirmation?confirmation=6d3a77679db63a94c16307ae133d9373b23c3986
insure that the /api is in both links.