I have an app that uses AFNetworking to log the user in to a web service. I want to load a WKWebView using the same session as that one being stored in the AFNetworking GET/POSTS to my webservice but google has failed me so far. Can anybody point me in the right direction?
I can no doubt get the session id from AFNetworking and manually pass it to my NSURLRequest for my WKWebView, but that seems a bit too manual, or is that the right way to do it?
Thanks in advance!
Related
So i am making a social media like site where i use react for frontend and expressjs for backend...
I was using public api till now but now i need private api to control some login info. So, i cannot understand how to do it. Because the link where it will request can be viewed by doing Ctrl+Shift+I and can be used by anyone
I still have methods to do but just wondering, if any way to know where does the request comming from
Let assume that the api site is api.some.site and the main site is some.site, so the request should only come from some.site else send 404 response and i need to do it with expressjs...
I don't know how to do it but I wanted to give you some information to think about. If you want people to be able to log in, on your site. That api end point has to be unprotected, because a logged out person does not have any credentials yet. When logged in the user would be able to access protected end points right? End points like password change of viewing specific pages. So all the data an user should or should not have access to should be handled by the server. You website is only a mechanism to make your data look pretty and easy to handle. So in a way you shouldn't care about people using your open end points from another location because their open anyways.
Authentication should never be handled client side. It should always be handled by a server.
This is my opinion, hope it helps. Sorry if it's not what you are looking for
I am trying to make a POST or GET request to a page that requires login.
Is there a way that I can login before I make the request or a way that I can make the request if I already am logged in on my browser?
Regards,
Alexandru Spinu
I made a little framework that I use to test my node apps. It is only one file and is rather misleadingly called django-endpoint-test here on github - at some stage I do plan to update this - let me know if this helps your scenario.
I'm trying to build an app that uses node/socket.io for a scorekeeper to update a form on a webpage (home/away/time) and have those results stored on the server for all clients to receive.
I'm a relatively new to node and socket.io, so would this be the best way to solve this problem?
Thanks for any suggestions.
Not sure if I understood the question, however if you have an online form and you need to push notifications from the server to the clients (i.e. they see updates without having to click or reload the page), you can use socket.io, yes.
I am developing a website in node.js and I am using Parse.com to handle the user registration and the Facebook users.
To handle the Facebook login with Parse, I have to use the line of code:
Parse.initialize(APP_ID, KEY);
which can be accessed by anybody by just looking at the source code of the website.
So my question is: if somebody has access to this information, can he access the data that I stored in Parse? he would just have to create some simple query, no?
I already initialize on the server side so is there a way to tell the template(jade in my case) that Parse has been initialized by passing some kind of parameters?
Thanks
If you set up ACLs and class permissions correctly in your app, then there should be no concern with handing out your JavaScript key. See this page for more information: https://www.parse.com/questions/javascript-sdk-security
I just want to be able to create a playlist by sending / receiving http requests ( a standalone web app, not with Spotify Apps and the desktop client). I've dug around the docs and can't find a clear solution. Can someone point me in the right direction? Thanks in advance.
You can pass a list of songs—not a playlist—to the desktop player by adding the track ids to a link as below
Play
UPDATE
As of today there is an api for creating playlists: https://developer.spotify.com/web-api/create-playlist/
I just want to be able to create a playlist by sending / receiving
http requests
This isn't possible at the moment — Spotify doesn't have a web API for manipulating playlists. You may be able to hack a solution together using libSpotify, although using libSpotify in a server service this way is against the ToS.
You might want to look at https://github.com/liesen/spotify-api-server
It is limited to just one spotify account (the one you configure it with) but does allow playlist creation/manipulation via RESTish calls.