System Information
- Strapi Version: 4.0.8
- Operating System: MacOS Catalina
- Database: Postgres 14.1
- Node Version: 14.18.3
- NPM Version: 8.4.1
- Yarn Version: 1.22.17
The registration process works fine as long as there is no redirect link set in “Advanced settings”. But as soon as there is a redirect link (to the root page of my Quasar localhost app at http://localhost:8080/), I get a 400 as return. The user, however, is created. Also, the test mail is sent successfully. The “shipper email” is set to the same email address that the “Test email delivery” uses (in the “Configuration” section). sendgrid is used as email provider.
This is my submit function:
function handleSubmit() {
[...]
return api.post('/auth/local/register', { username: state.username, email: state.email, password: state.password })
.then(response => {
$q.notify({
type: 'positive',
position: 'top',
message: 'Registration successful!'
})
})
.catch(error => {
$q.notify({
type: 'negative',
position: 'top',
message: 'Registration error: ' + error.message
})
})
}
// Email provider config
module.exports = ({ env }) => ({
email: {
config: {
provider: 'sendgrid',
providerOptions: {
apiKey: env('SENDGRID_API_KEY'),
},
settings: {
defaultFrom: 'myemailaddress@gmail.com',
defaultReplyTo: 'myemailaddress@gmail.com',
testAddress: 'myemailaddress@gmail.com',
},
}
},
'users-permissions': {
config: {
jwt: {
expiresIn: '14d',
},
},
},
[...]
Backend and Frontend run on localhost… Any idea what I am missing or doing wrong?