ronzeidman / ng2-ui-auth

an angular2 repository for authentication based on angular1's satellizer
MIT License
206 stars 64 forks source link

Authorization fails for Google login #34

Closed ChamithaCalcey closed 8 years ago

ChamithaCalcey commented 8 years ago

Hi ronzeidman,

A 404 error occurred with zone.js file while authenticating the user (POST request). Please refer to the attachments.

Thanks

capture

WebClientFrontEnd.zip

ronzeidman commented 8 years ago

The error says that there is no such route with the name auth/google in your server, the code you gave was client code. I guess your problem is that you didn't implement the server-side. You can see a basic server-side example for basic login, google and twitter here: https://github.com/ronzeidman/ng2-ui-auth-example/blob/master/server/src/routes/auth.ts and an example for various server-side implementation for everything and many languages here: https://github.com/sahat/satellizer/tree/master/examples/server

ChamithaCalcey commented 8 years ago

Can you please explain how to implement the server side with my existing code. I'm new to Angular 2 and can you describe me the basic steps?

ronzeidman commented 8 years ago

The server-side is not about angular2 it's an implementation that runs in your server to save your user login info in your database. If you are using a serverless implementation (like firebase/horizon) you'll have to use a serverless authentication solution like auth0 (https://auth0.com/). In what language is your server written? whats the database you are using?