CORS error on Okta authorize api end point from frontend

Thanks. Could you suggest how I can achive this with ajax call. Browser rediect will refresh the page. Is there anyway of extend the session token without redirect.