Hauora icon indicating copy to clipboard operation
Hauora copied to clipboard

Authentication credentials?

Open VijaySankhat opened this issue 6 years ago • 6 comments

Please provide username and password to login on the localhost. I have downloaded your them but not able to login.

VijaySankhat avatar Aug 09 '18 06:08 VijaySankhat

First you must run a url in backend project ( localhost:3000/api/iniciaNutricionista ), with this, you create a new user (email: [email protected], password: 123456).

Don't forget to create a new mongoDB instance (it can be in mlab.com) , and insert de db url in https://github.com/muriloe/Hauora/blob/master/back-end/config/index.js and

muriloe avatar Aug 09 '18 12:08 muriloe

@muriloe Thank you very much :-)

VijaySankhat avatar Aug 10 '18 05:08 VijaySankhat

@muriloe great app! nicely coded! I´m still having issues to log in. I followed the instructions (created db, run api, user was created) but still it doesnt log in, and I get this msg ¨Oh snap! Login/Email combination is not correct, please try again.¨ is there a way to fix it or remove the log in feature?

Thanks again!

abrajamcm avatar Feb 28 '19 05:02 abrajamcm

Hello,

Please, send me a image of your navigator console and network opened, after login attempt.

muriloe avatar Feb 28 '19 11:02 muriloe

Does it has to do something with the server name of the server.ts and core module.ts ? I get this error: OPTIONS http://ec2-54-191-75-41.us-west-2.compute.amazonaws.com:3000/api/nutricionista/login net::ERR_CONNECTION_TIMED_OUT   | (anonymous) | @ | VM8791:1   | scheduleTask | @ | zone.js:2933   | ZoneDelegate.scheduleTask | @ | zone.js:411   | onScheduleTask | @ | zone.js:301   | ZoneDelegate.scheduleTask | @ | zone.js:405   | Zone.scheduleTask | @ | zone.js:236   | Zone.scheduleMacroTask | @ | zone.js:259   | (anonymous) | @ | zone.js:2966   | proto.(anonymous function) | @ | zone.js:1366   | (anonymous) | @ | http.js:2366   | Observable._trySubscribe | @ | Observable.js:172   | Observable.subscribe | @ | Observable.js:160   | subscribeToResult | @ | subscribeToResult.js:23   | MergeMapSubscriber._innerSub | @ | mergeMap.js:138   | MergeMapSubscriber._tryNext | @ | mergeMap.js:135   | MergeMapSubscriber._next | @ | mergeMap.js:118   | Subscriber.next | @ | Subscriber.js:91   | ScalarObservable._subscribe | @ | ScalarObservable.js:51   | Observable._trySubscribe | @ | Observable.js:172   | Observable.subscribe | @ | Observable.js:160   | MergeMapOperator.call | @ | mergeMap.js:92   | Observable.subscribe | @ | Observable.js:157   | FilterOperator.call | @ | filter.js:61   | Observable.subscribe | @ | Observable.js:157   | MapOperator.call | @ | map.js:57   | Observable.subscribe | @ | Observable.js:157   | MapOperator.call | @ | map.js:57   | Observable.subscribe | @ | Observable.js:157   | MapOperator.call | @ | map.js:57   | Observable.subscribe | @ | Observable.js:157   | CatchOperator.call | @ | catchError.js:80   | Observable.subscribe | @ | Observable.js:157   | SwitchMapOperator.call | @ | switchMap.js:70   | Observable.subscribe | @ | Observable.js:157   | NbLoginComponent.login | @ | login.component.js:29   | (anonymous) | @ | NbLoginComponent.html:6   | handleEvent | @ | core.js:13547   | callWithDebugContext | @ | core.js:15056   | debugHandleEvent | @ | core.js:14643   | dispatchEvent | @ | core.js:9962   | (anonymous) | @ | core.js:12301   | schedulerFn | @ | core.js:4343   | SafeSubscriber.__tryOrUnsub | @ | Subscriber.js:239   | SafeSubscriber.next | @ | Subscriber.js:186   | Subscriber._next | @ | Subscriber.js:127   | Subscriber.next | @ | Subscriber.js:91   | Subject.next | @ | Subject.js:56   | EventEmitter.emit | @ | core.js:4311   | NgForm.onSubmit | @ | forms.js:5762   | (anonymous) | @ | NbLoginComponent.html:6   | handleEvent | @ | core.js:13547   | callWithDebugContext | @ | core.js:15056   | debugHandleEvent | @ | core.js:14643   | dispatchEvent | @ | core.js:9962   | (anonymous) | @ | core.js:10587   | (anonymous) | @ | platform-browser.js:2628   | ZoneDelegate.invokeTask | @ | zone.js:425   | onInvokeTask | @ | core.js:4740   | ZoneDelegate.invokeTask | @ | zone.js:424   | Zone.runTask | @ | zone.js:192   | ZoneTask.invokeTask | @ | zone.js:499   | invokeTask | @ | zone.js:1540   | globalZoneAwareCallback | @ | zone.js:1566

abrajamcm avatar Mar 01 '19 01:03 abrajamcm

Are you running the back-end project?

After running the back-end project you must change the baseEndpoint https://github.com/muriloe/Hauora/blob/master/front-end/src/app/%40core/core.module.ts

The address http://ec2-54-191-75-41.us-west-2.compute.amazonaws.com:3000/api/nutricionista/login was my old server.

If you are running on your local machine, just replace the above URL with localhost: 3000 which is the back-end endpoint in core.module.ts;

baseEndpoint: 'http://localhost:3000'

muriloe avatar Mar 01 '19 17:03 muriloe