apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

Login attempt with Fiware throws Internal Server error #3209

Closed Nazarah closed 6 years ago

Nazarah commented 6 years ago

Steps to Reproduce:

(required: Fiware login to be active in the environment)

  1. go to page: https://staging.apinf.io
  2. click Sign Up
  3. Click register with Fiware.
  4. Create a fiware account with required information (username, email address, password) [you can use randomly generalized emails using http://www.throwawaymail.com/en]
  5. Confirm email address in the sent email by clicking the link
  6. go to page: https://staging.apinf.io and click sign in
  7. click sign in with fiware
  8. provide the used credentials on the fiware window and click sign in
  9. click Authorize button

Outcome: User can't sign in using created fiware account. Page shows Internal Server Error fiwaresigninerror

Expected Behavior: Users should be able to sign in to APInf platform with valid credentials used for Fiware account.

Environment: Windows 10, Chrome browser (latest), IE11, APInf Staging (https://staging.apinf.io) Fiware information in staging environment: image

Cases verified

  1. Creating a fiware account with completely new email address (never used in APInf) + attempting to sign in
  2. Creating a fiware account with previously used email address (in APInf) + attempting to sign in
Nazarah commented 6 years ago

Verified in nightly.apinf.io with completely new email address used to register fiware account.

fdelavega commented 6 years ago

I have been able to debug this error.

It seems that meteor is expecting a username field to be provided, but this field is not being provided as part of the account data generated by apinf-fiware package.

So in AccountsServer.Ap._attemptLogin (packages/accounts-base/accounts_server.js) the field result.error contains something like "Missing Username field", which is then included in attempt.error which (not sure why) generates a circular JSON error.

Anyway, I have included the username field within the serviceData provided by the package and that seems to solve the problem.

This have been provided in apinf-fiware repo in PR 23, although I have not yet included the tests

preriasusi commented 6 years ago

https://github.com/apinf/apinf-fiware/pull/23 closes this.

Nazarah commented 6 years ago

reopening this issue as it has emerged in release 0.55.0 in https://staging.apinf.io This case registering attempt using fiware shows server error.

Also login isn't possible.

http://recordit.co/3e2bhFccY1

CC. @preriasusi

preriasusi commented 6 years ago

Works now fine on nightly and saas. Closing again

Madhu-NEC commented 5 years ago

I am facing the same issue. The installation of APInf is done using docker-compose. I am using apinf/api-umbrella:0.15.0-apinf2 docker image for API-Umbrella and apinf/platform:0.58.0 docker image for APInf. I have created the separate issue for this Issue:3727