I have a frontend using Vue.js and a backend using Java Spring.
I'm trying to get the Windows Username and display it.
So for this, I activated my front end server as an Intranet server in my Windows params. I saw here that there's a possible way to get the windows username with IIS by activing this option.
But it is possible, with Vue.js, to get it without using IIS or any other way?
If you do not want to use Microsoft Auth you can set a environment variable when you launch your app from server, and then you can access your user name variable from process:
export default {
name: 'PageOrComponent',
data() {
return {
userName: process.env.USER_NAME
}
}
}