Skip to content
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

Remove client id and client secret from the app.js. #157

Open
alexeybondarenko opened this issue May 3, 2017 · 6 comments
Open

Remove client id and client secret from the app.js. #157

alexeybondarenko opened this issue May 3, 2017 · 6 comments

Comments

@alexeybondarenko
Copy link
Collaborator

I think we can proxy auth API methods and hide API credentials in node js server.

@kumarsujendra
Copy link

Hi Alex, I am trying to host https://github.com/Nebo15/gandalf.api and https://github.com/Nebo15/gandalf.web to AWS EC2 server, but getting error 401 Unauthorized
Demo URL - http://35.170.26.106:8080/#/sign-in

How can I generate API_ENDPOINT, API_CLIENTID and API_CLIENTID
Please guide

@alexeybondarenko
Copy link
Collaborator Author

@kumarsujendra hi. Thanks for you question and that you are using Gamdalf. I will try to help you soon. Let me try to run gandlaf localy to understand that can be wrong in instruction) I didn t do that for a long time))

Are you using Docker for the deployment?

@kumarsujendra
Copy link

kumarsujendra commented Apr 9, 2018

@alexeybondarenko , Thank you for quick response.
I am doing installation as below
Web

  1. Clone gandalf.web from Git
  2. docker build -t demo . and run docker

API

  1. Clone gandalf.api from Git
  2. docker-compose up -d
    I think we need only https://github.com/Nebo15/gandalf.api/blob/master/docker-compose.yml to install API
    But Web and API is not communicating and getting 401 Error

Can we install web and API without docker ? If yes , Please explain me more details.

@alexeybondarenko
Copy link
Collaborator Author

Ok. I see. I will try to answer you soon

@ksankark
Copy link

Hi,
I am trying to install web and api in docker(ec2vinstance). I can access GUI properly, but unable to communicate with API.
I have followed the instructions here, https://gandalf4.docs.apiary.io/#introduction/installation-guide , is there any other extra configuration I am missing.

Also a detailed instructin for configuring and installation would be helpful.

@kumarsujendra
Copy link

kumarsujendra commented May 3, 2018

@ksankark , It seems that you missed database migration.

  1. On API server console run php arisan migrate --seed command. This will migrate database to your local database.
  2. Once migration done successfully, you can open mongodb and browse collection 'oauth_clients' which have client_id and client_secret. This details should be updated in Web env. file
  3. Open Web env file and update API_CLIENTID and API_CLIENTSECRET.
    After doing this API and Web will interact correctly.
    FYI @alexeybondarenko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants