Comments (14)
I'm planning to do user CRUD after login, which is also requested #20 . Also I'm doing major refactor job atm to whole boilerplate so I have to finish those first.
Sorry, that I cannot give you any timeframe for this, but it's coming at somepoint. Feel free to make a PR about this or/and continue this thread with wishes and actual functionality spec about this feature.
from angular-sailsjs-boilerplate.
I'm curious how this is going to be done with the client and server being on two different domains. So far, I haven't been successful, getting Facebook and Google login/registration working.
They're don't allow you to make an ajax request to the backend, then have the response redirect you to facebook/google. (which is a good thing)
I've had to resort to using a login page severed up from sails, bypassing the frontend. Still, you have to set the auth_token on the frontend domain's localstorage. I guess I could use a cross-domain hack to do this.
I'm starting to think running the backend and frontend on two different domains is a horrible idea. Deploying this is also tricky, especially if pushing to heroku or something similar. That's for another discussion though.
from angular-sailsjs-boilerplate.
@stevenirby basically like this http://matthewtyler.io/handling-oauth2-with-node-js-and-angular-js-passport-to-the-rescue/
from angular-sailsjs-boilerplate.
@tarlepp thank you! I finally got it working. I needed to do this:
response.writeHead(302, {
'Location' : 'http://localhost:3001/dashboard?token=' + data.token + '&user=' + user.email
});
response.end();
Instead I was trying to return json to the client or just do a response.redirect('http://localhost:3001/dashboard', 200);
from angular-sailsjs-boilerplate.
That link is dead. How do I do local and oauth registration?
from angular-sailsjs-boilerplate.
This one is "hard", I'm thinking to make something for this in my "christmas" holiday - maybe.
from angular-sailsjs-boilerplate.
So basically no progress on my "christmas" holiday for this... Now I got some time for this project again, not much but some, so I'll try to implement this. And if you guys have already done this, please share that.
from angular-sailsjs-boilerplate.
+1
from angular-sailsjs-boilerplate.
This is something that I should take proper look, unfortunately I don't really time to do all this... So if one you have done this already please make a PR.
from angular-sailsjs-boilerplate.
I'm having trouble where the user information is sent to the oauth popup window rather than the web app. Sometimes it will show the JWT token, other times it shows an "Invalid User Error"
from angular-sailsjs-boilerplate.
@Tenkir popup?
from angular-sailsjs-boilerplate.
@tarlepp: Facebook's login page popup window.
from angular-sailsjs-boilerplate.
@Tenkir oh ok, that explains. Note that only local
auth is supported atm.
from angular-sailsjs-boilerplate.
I've almost got this worked out, I'm just having an issue getting the data from the oauth popup back to the angular app. I'm getting:
DOMException: Blocked a frame with origin "http://localhost:9000" from accessing a cross-origin frame.
Anyone have any idea how to get this working? Once it does I'll open a PR.
Here's a gist: https://gist.github.com/Tenkir/ffe243b85ebb98e0910f
EDIT:
I got this working, though it's not elegant. Basically I pull the JSON text from the HTML body and parse it into the parent window.
from angular-sailsjs-boilerplate.
Related Issues (20)
- Bootstrap dropdown menu not showing HOT 1
- Serving production without gulp HOT 1
- DataModel handler verb 'Deleted' should be 'Destroyed' HOT 3
- Angular 2 version HOT 2
- scss-lint gem install required on Win 10 HOT 2
- Start error HOT 3
- Error in Add new Author HOT 8
- Add New Author (or Book) URL is incorrect HOT 1
- Local/Social Login + Admin users with roles HOT 5
- Error on deploying dist HOT 4
- angularSails sending __getcookie to http://localhost:1337 in production HOT 3
- AuthInterceptor and user token not passed HOT 1
- New Homepage HOT 4
- Error in Livereload HOT 2
- Error to try 'sails lift' HOT 3
- Error login outside localhost HOT 10
- Problems to enable the profile.html
- Upload files to AWS S3 HOT 1
- How to manage delete cascading HOT 5
- error in production HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-sailsjs-boilerplate.