Using webAuth.authorize()

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’,

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?