Questions tagged [single-page-application]

1

votes
3

answer
62

Views

How to access image from /storage -laravel- from SPA with vuejs

if i put an image in 'storage/app/public/img/logo.png' and execute:  $ php artisan storage:link How i get that logo.png in vue component? The requested it's ok (200) but that image not render, because is an SPA. Thank you,
Wiicho Orozco
1

votes
1

answer
56

Views

Laravel passport: Manually create access token

I'm building an SPA using VueJS and Laravel. I'm using Laravel passport for logins which works fine. However I would like the ability to send users magic links to log in with. However I'm not sure how to create an access token without sending a request with the password to the oauth route. It seems...
John Mellor
1

votes
1

answer
52

Views

Django all auth: How to override the confirmation email url

What I want to do is to override confirmation email url in templates/account/email/email_confirmation_message.txt. I want to change this part To confirm this is correct, go to {{ activate_url }} to something like http://localhost:8080/confirm_email/{{ key }} However, I couldn't figure out where {{...
Ooto
0

votes
0

answer
18

Views

How to integrate Social Login with existing .Net core Web API backend and Angular SPA frontend with working OpenIddict user/password and bearer token

TL;DR Question: how to implement social login (OAuth2 authorization flow) with an existing SPA/Web API application that is based on identity, user/password, bearer token authentication? I have an existing application that has: Backend: .Net Core 2 Web API with Identity and OpenIddict services config...
Fernando Ribeiro
1

votes
0

answer
379

Views

Pre-render VueJs application issue with prerender-spa-plugin

I'm using prerender-spa-plugin to pre-render my vueJs application for sake of SEO. It seems to be working normally but I have an issue with Javascript (eg: OnClick, onSubmit) it didn't fire. Any hint?
Momen Zakaria
1

votes
0

answer
45

Views

What is the best way to organize code while building multiple offices in a single projet with VueJS and Laravel

I'm building a SPA using VueJS (with VueRouter) and Laravel and I need to create multiple office within the same application. The application will handle 3 actors : clients, professionals and administrators. Those actors can all login to an account and access different functionnalities. The clients...
Cephou
1

votes
0

answer
509

Views

In Single Page Application which is the best way to maintain user session?

I am developing an SPA using MERN technology stack. I want to maintain user session. Which are the best ways use session management and what information we need to store in client side? 1) Session storage 2) Local Storage 3) Cookie.
Anurag Gautam
1

votes
0

answer
13

Views

force user to refresh spa

Imagine, you're having SPA. The website never gets refreshed for the new data is always fetched via ajax. It means that your users may not refresh the website even in 7 days in a row for example (I mean, you just close your mac with a chrome open, on the next day you open computer, open website and...
Ivan Hanák
1

votes
2

answer
118

Views

Remove hashbang for incoming urls in angularjs

Is it possible to remove the hashbang from angularjs URLs when redirecting users from another webpage? I have a website in AngularJS and I've been able to remove the hashbang symbols from the address bar for all URLs within my page (when redirecting from one view to another). I used HTML5Mode accord...
zapLines
1

votes
1

answer
339

Views

Vue.js SPA with Laravel API

I have a problem with defining routes for frontend portion of the application. It is Vue.js with Vue Router. Since it is SPA I think defining all routes in Laravel is not the correct answer but it seems I need to somehow because content is not served with current setup. Does Vue Router fetch the ent...
1

votes
0

answer
246

Views

ASP.Net Core 2 and Windows authentication with static files

I am deploying a SPA (React) app using ASP.Net Core and IIS I need to use windows authentication to call an API from the UI Does anyone know how I can insert the appropriate headers into my pages for using Windows Authentication?
Alan
1

votes
1

answer
114

Views

How to bootstrap modules in Angular 2+ with server side response

I used to bootstap my Angular JS app with a call to the server to get the modules a user has access, I can't figure how in Angular 2+ This is a AngularJS exemple I used ngMockE2E only for the mock exemple. (function (ngNode) { angular.module('boostrapApp', ['ngMockE2E']).service('clientModule', fun...
1

votes
0

answer
96

Views

Nginx config for Express SPA?

I am setting up a Ghost blog which works as a React-based SPA. Everything's hosted on DO. That means I don't have a great way to tool around with Express, which is what powers Ghost. For my frontend, I need to always serve my index response, regardless of the URL. This is my nginx config now, with e...
lostPixels
1

votes
1

answer
274

Views

Webpack global JS error handler and “Script error”

I have a react project build with Webpack. There is an error (most likely a missing JS feature, but it's just a guess), that only reveals itself in 'fetch as Google', whatever browser/JS engine they're using in this tool. Obviously I don't have a console or other means to get an error, other than w...
Oleg Shemetov
1

votes
0

answer
40

Views

How to avoid reloading SoundCloud widget in React SPA when linking away and back

I have a React Single Page Application, and one of the links is a page with an embedded SoundCloud widget. When I link away and come back to that page the widget is reloaded, sending various network requests. I want to keep my application as lightweight as possible. Is this just the nature of SPAs...
akorn3000
1

votes
0

answer
344

Views

Firebase Hosting : How to Redirect URLs Based on Origin Domain

I have rules as follows, but I want this to only work if origin is any other domain except the current domain. If my domain is friends.com, everything should go to index, otherwise be handled like below. e.g, if origin is from Google, with a path like friends.com/user, that should call an firebase h...
Relm
1

votes
1

answer
43

Views

Is there a classical way for securing a SPA and an API using Google Cloud App Engine?

I’d like to use the Google Cloud App Engine to serve a SPA and a REST API, both secured behind an authentication wall. Is there any recommended way of doing this? So far, I’ve found tutorials on how to secure an API, but not an SPA. Both ends are served from different projects, but I’d like to...
Lucas
1

votes
0

answer
54

Views

AngularJS multiple resolve for different APIs but only call the APIs if the user is authorized which is checking another resolve

Look at sample code below, there is authorize function, first item in resolve, the problem is before my authorize function return response the other items like initData() and dashboardData() will start and try to fetch data, I want initData() and dashboardData() to start only after my checkAuthoriza...
Abeez
1

votes
0

answer
16

Views

Prerender behaviour when redirect meta tag is set

I have an Angular SPA, with a particular page (Page A) which we want to temporarily redirect to another page (Page B). We set the following headers so that Prerender detects the redirect: Is it important that the prerenderReady flag is set to true AFTER Page B is fully rendered? Or will Prerender th...
MichaelAttard
1

votes
0

answer
28

Views

Converting SPA to Subdirectory Structure

I'm running a site that operates like a blog, with a main splash page and then linked content, where the content template is always the same. Because only the data changes from post to post, I originally created the site as an SPA, with JavaScript generating most of the DOM elements and injecting th...
Toby Penk
1

votes
0

answer
114

Views

How is the implicit flow of Opend ID Connect secure?

I understand that the in case of Single page applications that rely on bunch of rest apis, the implicit flow of Open Id Connect is recommended. What i fail to understand is how is it secure? The Authorization server returns the access and id token in the URL fragment after the user is successfully l...
Sumit
1

votes
1

answer
1.1k

Views

How to validate multiple file form field using vee-validate?

I have a multiple file select form field and i am using v-validate to validate it.How can i validate such kind of field? {{ errors.first('images') }} {{ errors.first('images') }} I am not using multiple. instead i am using images[] in two input type in two different row.
salin kunwar
1

votes
0

answer
22

Views

How do Facebook, Google, and many others keep me (securely) logged in for so long?

So I've been looking at creating a a website. How exactly has not been decided, but lets say I'm going to use a React.js single page application (SPA) that interacts with a REST API. This is fine and all, but at some point I am going to have to log users into this site. In looking into this problem,...
Pluckerpluck
0

votes
0

answer
7

Views

What is difference in webpack's code splitting between server-side-rendering and SPA?

is there any difference with code splitting(webpack) between in case of SPA(client-side-rendering) and server-side-rendering? Thanks!
NhLe
1

votes
0

answer
72

Views

Height of body doesn't resize after moving to other pages

I'm developing a single page web app using React & React Router, and now facing a problem as follows. When the app shows a long list of items, the length of body is extended and scrolling bar shows up (that's ok). Then you move to the other page which I expect the body to be 100vh (the same length a...
白水佑哉
1

votes
1

answer
68

Views

Prevent Starting Angular On EF Migrations

The problem is that when the db context is in the start up project, when i apply migrations using Update-Database visual studio is stuck on ng Serve. Note that i have modified Program.cs in orders for the migrations to run. output of PM> Update-Database Microsoft.AspNetCore.DataProtection.KeyManagem...
1

votes
0

answer
88

Views

Is it okay to use a 'hasFetched' with an 'isFetching' flag in redux state?

I'm new to redux thunk and have been using it to call an action creator that makes a request to an API to see if the user is logged in. If the user is not logged I want to redirect to the login page. I want a loader component to show while the user is still being fetched but also to wait until it ha...
1

votes
1

answer
940

Views

Angular 5 App Architecture design

I've few questions related to Angular 5 App design - We're designing an enterprise app which is something like placeholder of Widgets and Widgets Store. It works like this - When user lands on the page, he will see few widgets which he can customize. If he wish, he can add more widgets from Store. W...
Roopesh Reddy
1

votes
1

answer
647

Views

Google Adwords with Angular 5

I'm trying to use AdWords in a checkout SPA built with Angular 5. I need to set variables such as 'google_conversion_value' and then run the script located at //www.googleadservices.com/pagead/conversion.js However there are 3 issues: I can't use what the documentation says as this is an SPA. Settin...
Mark Curtis
1

votes
0

answer
509

Views

ReactJS with React Router single page application SPA with separate login page

I am new to React and React Router. I have been trying to create a single page application that has a layout with navigation bars and content and a login page that does not load inside this layout. I have been searching the web and stackoverflow, but have not been able to figure this out. To create...
Alice
1

votes
1

answer
394

Views

Insert multiple rows of data to multiple tables in a single page form before submitting and store to db in ASP.NET MVC

I am trying to create an Application Form as a single page web app in asp.net mvc. I am new to it and would really appreciate any help as I have researched on this problem for many days now to no avail. The form begins with some personal details about the User and then I have created some empty jque...
AGR
1

votes
0

answer
143

Views

OAuth2 flows for SPA with REST api

I'm building a single-page application that will interact with an Authorization Server (in my case GitLab) and two Resource Servers (GitLab and my own REST api). My own REST api will also interact with GitLab on behalf of the user. Now my question is whether to: use the implicit grant, which will re...
Nepoxx
1

votes
1

answer
427

Views

SPA Implicit Flow vs Authorization Flow vs Hybrid Flow

There seems to be a consensus about using the OpenId Implicit Flow for SPA(s) although there are some security concerns, does using HTTPS mitigate that risk or it's safer to go with another flow type? e.g. Authorization or Hybrid flow.
dotnetftw
1

votes
1

answer
254

Views

prerender-spa-plugin not working on the server

I'm trying to run build on the server. But with prerendering, the following error occurs. On desktop versions of ubuntu and macOS, there is no such problem, the problem is only server-side. I tried on different servers. 95% emittingError: Failed to launch chrome!...
Clara Oswald
1

votes
1

answer
146

Views

Precache react components using workbox 3.0

I am trying to precache the different components of my react app(using the route path) in the workbox 3.0 precache. But only the index.html gets precached without the content of the div tag which varies from page to page i) React routes ii) workbox-config.js globPatterns: [ '**/*.{json,ico,html,js,c...
Braj
1

votes
0

answer
50

Views

PWA Workbox Wizard is stopping after the first step

I am setting up a PWA and trying to add a Service Worker using Work Box. When I type 'Workbox Wizard' in to the terminal, only the first question about the root file is being asked and then the terminal freezes and I can't type anything else. Please help!
Connor
1

votes
0

answer
142

Views

Best way to store authentication token on SPA

I have Web API server and client in browser. Now i want to realize authentication system. Is it good way to store authentication tokens in cookies on client and make every HTTP request with 'Athorization' header(set this header from cookies)?
slow rarrih
1

votes
0

answer
227

Views

Vue.js with Pre-render SPA Creates Double Script Tags

I'm building an SEO friendly website using Vue.js, so I'm using SPA Pre-render plugin. When I npm run build both Vue.js and the Pre-render SPA plugin both mount a version of script tags into the of every page, and therefore they're duplicated. I've tried the following, in vue.config.js: new preRend...
Edgar Quintero
1

votes
0

answer
310

Views

Dynamically load Google Tag Manager and switch in SPA

The marketing department wants to separate the Google Tag Manager per country. For an normal website, not SPA, we can easily do this based on the URL. Would the client switch to another URL, then the page would be refreshed, country code added in the URL and the correct GTM can be loaded. Now for a...
CularBytes
1

votes
0

answer
43

Views

browser-sync does not update the ngModel

I am using browser-sync in a SPA built with AngularJS and Angular 5. I configured browser-sync like this: codeSync: true, ghostMode: { scroll: true, clicks: true, forms: true } The form is submitted in all the browsers. NgModel is updated only in the browser I am actively using, not in the synchron...
Daniela Donna

View additional questions