Question on the call of the on-site SP REST API 2016 with a third-party VUE application

I am trying to call the SP 2016 SP REST API on a third party VUE.js application (interdomain) and I am struggling on the problem of authentication.

  1. To avoid the problem between domains, I try to call the REST API via SP.RequestExecutor.js. But in the Network tab, I see "401 unauthorized" at the request of AppWebProxy.aspx when the following code is executed.

var executor = new SP.RequestExecutor (appweburl);
executor.executeAsync (
{
URL:
appweburl + "/_api/SP.AppContextSite(@target)/web/lists?@target=" + hostweburl
+ "& # 39;" method: "GET", headers: {"Accept": "application / json; odata = verbose"}, success: successHandler,
error: errorHandler
}
)

1.2. When I try to test the REST API http://www.example.com/_api/Web/Lists('{guidBuch')/items, the error message Below is the poster:

{
"Fault": {
"code": "-2147024891, System.UnauthorizedAccessException",
"message": {
"lang": "en-US",
"value": "Access denied, you are not authorized to perform this action or access this resource."
}
}}

My question is: how to pass the authentication when I call the REST API in js code?

Thank you all in advance.

javascript – PWA – with Vue and Vuex

I have trouble displaying the list in real time on smartphones,

Vuex caught with calculated:

productsFiltrados () {
return store.state.listProducts.filter ((product) => {
let query = product.name.toUpperCase ();
returns query.match (this.busca.toUpperCase ())
})
}

On the web, rendering is only perfect on smartphones whose list is locked. Only the rendering works if I erase something in the search.

SEARCH BY NAME: 

Someone knows how to get around this situation on his smartphone?

How can I pass the router settings to import a declaration into Vue?

I have road rule:

{
path: something /: category / index,
name: & # 39; index & # 39;
component: () => import (/ * webpackChunkName: "[request]"* /` @module / $ {category ???} / index.vue`)
}

how can I spend the Category var to use inside the import a function?