Open curiosport opened 2 years ago
The user interface is a classic Node JS project and should be compatible with Windows. What is your error message?
@ncarlier I had an error that react-scripts is missing with npm, so I fixed it this way:
npm i react-scripts --legacy-peer-deps
npm start
I also had a problem with the file:
"readflow/ui/package.json"
In the line:
"lint": "eslint './src/**/*.{ts,tsx}'"
Basically the error was telling me that no file was found that met that criteria, I solved it this way:
"lint": "eslint \"./src/**/*.{ts,tsx}\""
Anyway, I managed to run the server but the problem is that I can't use the forum without going through the authentication system, are there any test users?
On the other hand, what should I do if what I want is to use another authentication system completely different, is there documentation for that or can you give me a small example?
Oh, I forgot to mention that I also had a problem with the cache package, specifically this file: "readflow/pkg/cache/cache/cache.go"
In the instruction:
cache, err = boltcache.New(size, u.Path)
I got an error like os.Open cannot find file [u.Path]
Apparently u.Path has the path format as in linux, so I made a workaround like this:
func New(conn string, size int) (Cache, error) {
[...]
cacheFileName := filepath.ToSlash(
os.TempDir() + string(os.PathSeparator) + "readflow.cache",
)
cache, err = boltcache.New(size, cacheFileName)
[...]
}
As you can see it is not an efficient solution but it is useful while testing.
Thank you very much for reporting these problems. I fixed cache loading by cleaning the path according to the OS and I update the lint cmd. Regarding node dependencies I will update all dependencies and deal with the breaking changes.
Regarding your authentication problem, you have to build the user interface with some configuration:
# if using OIDC provider such as Okta, Google, Auth0, Microsoft, ...
export REACT_APP_AUTHORITY=https://your_sub_domain.okta.com
# or if using a Reverse Proxy such as Traefik, NGINX, Apache, ...
# username will be extracted form one of those HTTP headers: `X-WEBAUTH-USER`, `X-Auth-Username`, `Remote-User`, `Remote-Name`
export REACT_APP_AUTHORITY=mock
npm run build
More info here: https://github.com/ncarlier/readflow/blob/master/ui/README.md
@ncarlier I meant to use my own authentication system, so I will not use any of these:
Okta, Google, Auth0, Microsoft, ...
Traefik, NGINX, Apache, ...
I imagine mock
is the way to go, could you tell me the .go files that do the validation when using mock
? I'll see if I can adapt the code.
I don't know what your authentication system is but for your information, there are very good self-hosted OpenID Connect solutions (Keycloak, Hydra, ...)
The authentication using the proxy is handled by this middleware: https://github.com/ncarlier/readflow/blob/master/pkg/middleware/proxy-auth.go
Well I managed to make some progress in the compilation but the ui with npm I can't build it in Windows, should I do it with linux?