sample-app-aoai-chatGPT
sample-app-aoai-chatGPT copied to clipboard
Allow disabling identity provider requirement with an environment variable
Disabling identity provider authentication through an environment variable would be a great quality of life improvement.
Doing it manually in the code itself is easy, but also seems to require a bunch of additional steps to set up a new pipeline, hosting a new Docker image or manually getting the code onto an Azure Web App.
Disabling identity provider authentication through an environment variable would be a great quality of life improvement.
Doing it manually in the code itself is easy, but also seems to require a bunch of additional steps to set up a new pipeline, hosting a new Docker image or manually getting the code onto an Azure Web App.
Where did you manage to disable the IDP? I'm trying to run in a devcontainer but I am hit with the Authentication error when trying to run via start.sh. This is after populating the .env as completely as possible.
EDIT: I think I found it in Chat.tsx:
const getUserInfoList = async () => {
const userInfoList = await getUserInfo();
if (userInfoList.length === 0 && window.location.hostname !== "127.0.0.1") {
setShowAuthMessage(true);
}
else {
setShowAuthMessage(false);
}
}
I think my issue was that I was being accessed via localhost instead of 127.0.0.1 and then looking for the .auth/me stuff.
I agree making it environment driven regardless of local hostname would be nice.
@entmike @Xtrah Hi all, can I please ask how did you disabled the identity provider authentication requirements? just by converting "localhost" into "127.0.0.1"? because for me didn't work. I appreciate your help. Best
@Mshz2 this is what I did when I created the issue a month back: https://github.com/Xtrah/sample-app-aoai-chatGPT/commit/3981666ca802c55b161c6df49e3e2d39e95d3b4f
Be aware that the above fork is a few commits behind this repository now, so the code might have changed.
@Mshz2 this is what I did when I created the issue a month back: https://github.com/Xtrah/sample-app-aoai-chatGPT/commit/3981666ca802c55b161c6df49e3e2d39e95d3b4f
Be aware that the above fork is a few commits behind this repository now, so the code might have changed.
@Xtrah The link seems to be unavailable now! Could you please guide us through all the changes you made to disable the IDP. I am still being redirected to Microsoft login page.
Addressed in 436