Added even more generic CORS

for some reason I started getting CORS blocks again, so I added a generic CORS function

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
Facebook and twitter via passport

Moved the APP_ID constants to a setup options that were not dependent on server environment.
Set the 'Content-Type': 'application/x-www-form-urlencoded' as the default for all http.post actions.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
Rewriting Jade as HTML

So that we don't need to be running node to see these pages, and so that we can all use standard HTML

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
Lost some of my repository settings including the name

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
registered a constants service, updated Registration

in order to hang onto things like the niiu application GUID, NIIU_APP_GUID.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
Registering via facebook

the facebook.php file just shows what information is accessible at the Facebook callback url.

Unfortunately the passports js functions that I am using are dependent on node for the standard Facebook login.

Working instead on creating a new Facebook angular service.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
loading the Facebook js sdk

taking a step away from Node and passport it is rather straightforward to load a page with the Facebook js sdk, and then allow users to click a button to authorize your app, then you have access to all of the data the requested.  in the dev folder is a folder called plunker which loads a page with an authorization via Facebook.
if I use the Facebook authorization button it seems to work fine but when i try to authorize with a function on click of another element the login function seems to get called immediately and not on click.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
beed to remove the second controller

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
Trying a clearer organized login manager

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
simpler authentication in dev

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
returning the old callback url

In order to review the node based auth I returned the default Facebook callback url.

Before I was sending the callback to a separate url to see what the contents of the Facebook object were.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
auth stored in login scope

access to auth token stored in scope.auth

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
trying to pass the user info on

for some reason the userobj from Facebook has the user info hidden in $$v. Not sure what this is or how to get it out.  will check the Facebook api further.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
for the Facebook info into a format for the niiu social login

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
saving authentication data in db

hold onto to auth token and such we can use it on reload.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
YDN DB

don't think these files are helping

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
YDN Safari Issues

So for some reason the YDN that I was using wasn't working as anticipated on safari.  We learned earlier that we had to define the keys differently so they would be accessible in safarii, but you can only have one key in a table which doesn't jive with this user info table Ive been using.

I think what I am going to do instead is to put this entire user info object as an object into safari and we will take it from there.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
same as the last commit

Another issue is that safari has been looking for a whole bunch of other files from the ydn library.  Since it never seemed to need them to function before I am going to save them as a stash and keep them out of here for now.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
keys not being passed in safari

for some reason the keys are not being set properly in safari.  Something we had solved previously but not working again not sure what has changed.

Signed-off-by: Kirk Peterkin <kirk@niiu.de>
these extras are annoying

will delete this yen.db folder

Signed-off-by: Kirk Peterkin <kirk@niiu.de>