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

Oauth: An error has occured #78

Open
mintu19 opened this issue Mar 11, 2016 · 3 comments
Open

Oauth: An error has occured #78

mintu19 opened this issue Mar 11, 2016 · 3 comments

Comments

@mintu19
Copy link

mintu19 commented Mar 11, 2016

I am running lelylan microservices with
api-proxy at :8000
people(Oauth) at :3000
Websocket at :8002
Device Dashboard at 9001 and Types Dashboard at 9000

All services are running without errors and all links are working. However when I try to sign in from dashboard or types dashboard, instead of lending me on authorization page, it shows an error.
screenshot from 2016-03-11 14 19 44

When I access http://lelylan.github.io/devices-dashboard-ng/, I am directly redirected to peoples page, there it ask for authorization and then redirects back to devices page but this setup is not working in local setup. When i create manually create client-id from application section on 'people' page, and set redirect url to http://localhost:9001, it authorizes but redirects back to dashboard sign up page and not on device page.
Shouldn't authorization be automated?

@andreareginato
Copy link
Contributor

Hi @mintu19, thanks a lot for trying out Lelylan. The problem seems to be related to the image you sent us is related to the missing OAuth2.0 client (and its configurations). If you set a new one and get redirected to the dashboard, but still in the login page, most probably there is a problem with oauth-ng, although chrome just works fine for us.

If you make some more attempts, let me know. I'll also get back to the issue by the end of the week.
All the best and good hacking :)

@mintu19
Copy link
Author

mintu19 commented Mar 15, 2016

I got it to work in this way: (but it seems weird)

  1. I created a one time user, then added a application for him.
  2. copied client id and put it in my dashboard gruntfile.js
  3. launched the dashboard
  4. logged out of account and forgot that user pass forever
  5. now I am able to create new user and give them access to device dashboard and type dashboard
  6. I have placed all services on one server and using Nginx for proxy service.

Using Oauth-ng 0.3.10 instead of older version actually solved the error, then after few changes in config (and sign up link too which points to your server) and I was able to make it to work.
Now i am making production environments work properly.

So is this approach just a work around or the correct way?

Also their is problem with using localhost redirect urls. It says redirect url is not valid.

@andreareginato
Copy link
Contributor

Hi @mintu19,

as you can guess this is not the suggested procedure. There is a lot of work, and a big part is related to make the setup phase way more complete and easy for everyone, so thanks a lot for all the effort you are placing into the setup and great that you were able to solve these issues. Would be great to add the changes you applied (seed and dashboard updates) to simplify the installation process for future users.

About the redirect URI for localhost, here an example of redirect URI that works well for me:
http://localhost:9000

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

2 participants