-
Notifications
You must be signed in to change notification settings - Fork 20
docker-compose up -d frontend Error #36
Comments
Thanks for opening your first issue 🦁 Your feedback, is the most valuable thing besides PRs 💚 |
Ah thanks, I've copied the Dockerfile from the oauth2-auth branch to master. Can you retry? :-) |
Thanks, it's up and running now. Hopefully I'll be able to contribute something in the next few days. |
I think running the front-end via Docker Compose is not even necessary. So instead of running the front-end via docker-compose, maybe it is better or simpler to run with npm or yarn, such that the changes are automatically reflected. I'll change this in the READ ME I think :-) I'm super new to the front-end stuff and currently I'm reading a book about TypeScript, so any help is super awesome :) |
Just merged the oauth2-auth branch into master. Let me know if you're running into problems, please :-) |
In regards to the recent changes:
|
|
I've added list item 13 in the README. As we also need a user with all rights to communicate with the SirixDB HTTP-Server in the future :) |
|
@mosheduminer we need to have a Keycloak server, as well as the SirixDB HTTP-Server running (for instance as docker containers). However, I have no idea how it would work without the support of the host network via Docker :( Yes, you definitely need a user, but the redirect to Keycloak should work at least. Maybe for Windows users it might be better to start the standalone.bat from Keycloak, import the Sirix realm and add an admin user for testing. There's some documentation for the REST-API as well: https://sirix.io/rest-api.html I'm currently writing an article for dev.to how I got authentication with Nuxt.js + external REST API Server (SirixDB HTTP-Server) + Keycloak to run. This might be helpful hopefully: OAuth2 Authorization Code Flow with Nuxt.jsIn general, our workflow is as follows:
|
@JohannesLichtenberger, sorry if I wasn't clear about the server issue. In commit ddb6f89 the line "Start the SirixDB HTTP-Server: As for authentication, the redirect does work. The problem is that when I try to view any page other than the callback page, I get the login page again. |
Ah, please rebuild your server image and first of all pull the changes I did to SirixVerticle in the rest-api bundle. |
I had to change a few things until I figured out what was wrong. The state parameters are mismatched I think between what Nuxt.js initially created and SirixDB created another state parameter. I think Nuxt.js should rise an error or maybe it does, but I had to look at the source code and it silently returns from the method |
Oh and the change to the README was meant like this, such that we can develope the Nuxt.js front-end without a running Docker container. |
Then start the SirixDB HTTP-server with:
|
I figured out my problem with auth. It seems that |
I fixed this by changing every mention of |
@mosheduminer Where is localhost:8080 hardcoded? Maybe you can change it in the sirix-conf.json file? {
"https.port": 9443,
"keycloak.url": "http://localhost:8080/auth/realms/sirixdb",
"auth.path": "http://localhost:8080/auth/realms/sirixdb/protocol/openid-connect/auth",
"token.path": "/token",
"client.secret": "2e54cfdf-909b-47ca-b385-4c44886f04f0",
"oAuthFlowType" : "AUTH_CODE",
"redirect.uri" : "http://localhost:3005/callback"
} Here the redirect.uri shouldn't have an effect as it's specified by Nuxt.js already |
I tried that but it had no effect.
I'm going to try to come back to this later. |
Hmm strange. Yes, basically the whole front-end as of now is at a very early stage (and we didn't implement any SirixDB HTTP-Server API calls as of now). Don't know where this error comes from :( I'm just reading a book about TypeScript, so that I hope I'll be able to put myself much more work into the front-end, as I think it's crucial to show what's possible with SirixDB :-) |
@JohannesLichtenberger I setup an ubuntu virtual machine, and got the same |
As far as I can tell, the issue comes from mockjs - see nuysoft/Mock#127, but I'm confused as to why this worked before. Additionally, there is a pull request from years back to solve the problem, but it was never merged. |
@mosheduminer woohoo, even setup an Ubuntu Virtual machine :-) As of today I'm for one week in holidays without a laptop, sadly. Maybe you have an idea about this: https://cmty.app/nuxt/auth-module/issues/c445 |
@JohannesLichtenberger enjoy your holiday! |
Hmm, it would be a great addition. Even more so, if this could be merged into the Nuxt.js auth module as a new official provider ;-) but if not for us it would be great, indeed. Thus, we don't need the SirixDB HTTP-Server to basically act as a proxy. Should only be needed for instance for pure SPAs, which don't have a running Node.js server. BTW maybe we can move our discussion to the forum, which is somehow very rarely used. But I think Discourse is a really great forum :-) |
The JWT tokens to be sent by Axios for manipulating or reading resources in SirixDB can then still be verified by the SirixDB HTTP-Server to check authorization :-) |
Okay I've opened a discussion on discourse. |
I'm trying to set up the project following https://github.com/sirixdb/sirix-web-frontend#project-setup, when I run step 14, I get the following message:
I am running docker toolbox on windows 10.
The text was updated successfully, but these errors were encountered: