Registration and Login (Authentication) with Vue.js and Strapi

Authentication is an integral part of application development, as it helps to secure user data and authorization.


This is a companion discussion topic for the original entry at https://strapi.io/blog/registration-and-login-authentication-with-vue-js-and-strapi-1

Hi,

I don’t undestand this part of the tutorial:

Setting the Permissions for Public Users

Next, we will create and assign permissions on notes collection-type for our public users by following the steps below.

  1. Click public
  2. Scroll down, click on users-permissions under permissions, then check all the checkboxes.
  3. Click save, then go back.

  1. There is no notes collection that has been created, only an bookmarks collection
  2. Why are you giving public access permission to everything by saying “check all the checkboxes”

Thanks,

To get this working properly I had to set Authentic
2. Scroll down, click on users-permissions under permissions, then check all the checkboxes.

Otherwise the login fails on the this.axios.get(http://localhost:1337/api/users/${user.id}?populate=* with a [2022-12-16 17:56:10.126] http: DELETE /api/bookmarks/2 (4 ms) 403 error.

You are actually logged in, but the redirect to home page fails as an error is raised by the 403 error and it stays on the login page, and the bookmark object doesn’t get created. However, you can click on the home page and you will have been logged in correctly.

Giving Authenticated role users-permissions under permissions, then check all the checkboxes. allows his.axios.get(http://localhost:1337/api/users/${user.id}?populate=* to work properly, thereby creating the local storage bookmark object, which then lets you add bookmarks properly as it assumes it has been created.

Also, the nodemailer code as written will now return Missing credentials for “PLAIN” nodemailer as Gmail now requires OAuth2. Please update the tutorial. There’s nothing worse than tutorials that don’t work or are out of date.