-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexing site with authentication #136
Comments
This is how I do it: |
Thanks @lxix :) Whilst you wrote your answer I also found an answer thanks to the tip in #105 (which this is essentially a dupe of!). Here is my solution when using azure's msal-browser auth package.
So essentially the build process is not a browser context, so we can detect that and allow it to bypass auth. But when its being served as a CSR the auth kicks in. |
In one deployment scenario we need to wrap the application in our SSO provide (azure) which means that the site is built with authentication enabled.
Lunr seems to do its indexing after the site is built (understandably) which means that in this scenario it cannot access any of the URLs (as it has no SSO credentials). This results in zero docs getting indexed of course.
The only workaround I can think of for this would be:
I dont expect that there is a lot you can do about solving SSO requirements here - but do wonder if you have any brainwaves on a better approach or method of generating the index in a different way?
The text was updated successfully, but these errors were encountered: