Start a new topic

Is there any way to implicitly set user (without login)

I'm developing app using angular+cordova. Everything looked great unless I've tested file saving.

As it was confirmed here none of way for sending file isn't working:

(Even when data is sent as binaryString transferred file isn't similar to file saved in ios tmp filesystem)

And here is what I'm trying to do. I've written small cordova plugin (objective-c) that allows me using elements of ios-sdk when needed executing js commands. The problem is I need to log user again in because session is not shared between angular-api and ios-sdk. It's a pain for normal users and impossible to do with those signed-in with social services.

Please let me know If there is any way to set shared properties and user session without using login method*. All data can be get from javascript.



_It must be but it's little difficult to find it without source codes. Would you be so kind to show what is need to transfer session from js-api to ios-sdk?_


While you won't be able to share state between the libraries for security reasons, but could you modify your code so that a call to login is executed on both libraries at once? For example, the user enters their credentials once, and then the app will call login on both the angular library as well as the ios one.

Does that work for you?
Didn't social authorisation require action from user?

Nevertheless, I believe that I've come up with cordova solution. To do that, I've needed to rewrite js $upload method. Am using it only for generating google link (so the part where authorisation is required). Link is passed then to small cordova plugin that reads and uploads file to it (objective-c).

Would be very happy to share it. It's much better than opening filesystem and reading file with javascript. Please let me know if you're intrested.

Yeah it does, but after social authorisation you should get an auth token, and then you call both login methods with that same auth token.

But it's great you found a solution with cordova! Can you upload it to Github, or as a Gist and post a link here? We'll take a look and it will be great for other developers as well. Thanks!
_Yeah it does, but after social authorisation you should get an auth token, and then you call both login methods with that same auth token._

I didn't think about that! Promise to try by next time.

Later today would send my solution to github
Here it is.

Sorry I did not have time to test cordova plugin installation - links and references. They should work. Would be very happy to do more, let me know if you have any questions
Login or Signup to post a comment