I’ve placed webAuth.authorize() in the app.js within the window.addEventListener(‘load’, function() {…} and it directs the user to the Universal login and if authenticated back to the SPA.
Supposing I wanted to use webAuth.authorize() in a conditional statement to send the user to the Universal Login only if they haven’t logged in.
What could I use to test prior to the login, ie
if (something does not exist)
{webAuth.authorize();} else {}
NB I’m using in the webAuth variable
responseType: ‘token id_token’,
scope: ‘openid’,